In CSS is very easy to overwrite a rule you have created earlier, then you wonder why making changes to the rule doesn’t apply to the page layout.
One thing to know is the !important rule available since CSS1.
Adding !important after a command like this:
.div { margin-left: 5px;color:#ff0000!important;margin-left: 3px;}
will make sure that all browsers will have a margin-left of 5px [...]
Do you ever wonder how you can center a containing div?
The use of “tables” or “center” tag makes the job a lot easier, but it will fail validation.
Another way of doing this is using CSS stylesheet.
body{padding:0px; margin:0px; text-align:center;}
#div_container{margin-left: auto;margin-right: auto;width:800px;}
The only problem with the above solution is that “#div_container” will also have the text centered.
To [...]