In CSS I always forget that when creating a box to put things in you want the box to expand with the contents that are inside of it. The secret to this I found out last year was to put overflow: auto in.
Example:
1 |
content { |
1 2 3 |
background-color: #fff; width: 960px; margin: 0px auto; |
1 2 3 |
overflow: auto; text-align: left; } |
The other trick was to put margin: 0px auto. That makes the element float in the middle of a page. This is the standard container CSS that I use.
Comments are closed.