CSS / IE — Quirks Mode Reminder (CSS Centering)
I often forget that IE resorts to “Quirks Mode” if you don’t include the proper DTD line (as the first line in your HTML file), so this is mostly a reminder to myself. Include the following line and save yourself some debug time!
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
Once you include this, you can resort to the CSS centering technique of fixed-width and ‘auto’ margins:
***** CSS ******
.myDiv
{
width: 400px;
margin: auto;
}
I would post the html here, but I can’t figure out how to make Tumblr let me include the necessary html tags in text (without stripping them from the magical post editor)
