Jump to content

[post deleted]


elcohen
 Share

Recommended Posts

You need CSS if you want to properly make a web page. To center a block of text you can set the max-width of the container and give it a left and right margin of auto.

HTML

<div class="text">
  <p>Lorem ipsum dolor sit amet</p>
</div>

CSS

.text {
  max-width: 600px;
  margin: 0 auto;
}

 

Link to comment
Share on other sites

1 hour ago, Ingolme said:

You need CSS if you want to properly make a web page. To center a block of text you can set the max-width of the container and give it a left and right margin of auto.

HTML


<div class="text">
  <p>Lorem ipsum dolor sit amet</p>
</div>

CSS


.text {
  max-width: 600px;
  margin: 0 auto;
}

 

Thanks for your reply @Ingolme ツ 

I'm trying to make this work in Tumblr. It has a section that allows me to 'add CSS' but it doesn't seem to work. Do you know how to get around this?

Thx

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...