Queef
Some people...
- Jul 27, 2012
- 645
- 289
This tutorial is incredibly basic and should be something every person that can code basic html and css on here should know, sadly, they don't.
I usually wouldn't post something like this but I'm sick of seeing messy coding on templates where people have margined their content from the left and the right of the screen because they don't know how to make a simple container.
First off
As mentioned in the above code, place your html for the specific area you're trying to center in the div tags of the container class.
Then apply this style,
You can change the width to whatever you like. The wider it is, the more spaced out and closer to the edges of the screen your content will appear.
Now, if theres a certain section in the page that you want to be wider for some reason you could easily do something like,
and the HTML for that would be,
I usually wouldn't post something like this but I'm sick of seeing messy coding on templates where people have margined their content from the left and the right of the screen because they don't know how to make a simple container.
First off
HTML:
<div class="container">
(Your content here)
</div>
Then apply this style,
Code:
.container { width: 900px; margin: 0 auto; }
Now, if theres a certain section in the page that you want to be wider for some reason you could easily do something like,
Code:
.container.wider { width: 1000px; }
and the HTML for that would be,
Code:
<div class="container wider">
</div>