CSS bump in IE Oct11 '05
After checking a slight code change in Internet Explorer, I just noticed my site is (all of a sudden) not looking right:
IE 6 is ignoring my CSS margins, and should be centering the entire layout:
#content
{
margin: 0 auto;
width: 793px;
}
As you can see, I have set a margin of 0 for the top and bottom, and auto for the left and right, which is how you center a block level element, with CSS.
Keep in mind, this method only works if there is an explicit width set, as well.
In Firefox, my site looks fine - the layout is centered. And, IE 6 was working fine the last time I checked it, but today it’s being weird.
I’ve tried toying with other selectors/rules, but nothing is "shaking it."
Why would it, all of a sudden, break - and only in IE 6? I don’t know of any other selectors/rules that (by accident) would break such a simple rule. In other words: the specificity can’t screw up a margin, can it?
Categories: Browsers
, CSS
, Web Development ![]()
Add Feedback (view all)
Leave feedback
matthom
is published and produced by Matt Thommes - an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from a suburb of Chicago.
Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us.
- In 1492 Columbus gave me the Netflix blues
- New article at Pain in the Tech
- Brightkite suggests Twitter instead of 404
Popular Pages
- Fast rounded corners in Photoshop (3954 recent visits)
- PHP – passing variables across pages (1485 recent visits)
- JavaScript set selected on load (1209 recent visits)
- Removing all child nodes from an element (827 recent visits)
- iPod songs out of order? (720 recent visits)
- Britney - Everytime piano tab (649 recent visits)
- Firefox 3 smart address bar: wildcard search (607 recent visits)
- MySQL LEFT JOIN syntax (513 recent visits)
- Breathe Me - Sia (501 recent visits)
- Tumblr: how blogging should be (384 recent visits)
Similar Entries
- Swap banner image with CSS and PHP (110 recent visits)
- CSS class, or HTML tag? (2 recent visits)
- CSS font-size dialogue! (5 recent visits)
- Misleading CSS link declarations (1 recent visits)
- CSS print style sheet (0 recent visits)
- CSS adjacent sibling selectors and IE 6 (62 recent visits)
Stats
0 unique visits since Oct11 '05