Sent by Eric A. Meyer on 6 January 2003 18:06
At 8:53 -0800 1/6/03, M. A. Sridhar wrote:
>Thanks for the input. That doesn't seem to resolve it, however. I changed all
>the measures in the file to pixels, and it still shows exactly as it did
>before under Mozilla.
Oops, I see the problem, and it's here:
div.blueBar {
background-color: blue;
width: 10px;
display: inline;
margin-right: 2px;
margin-left: 2px;
}
div.redBar {
background-color: red;
width: 10px;
display: inline;
margin-right: 2px;
margin-left: 2px;
}
You've made your 'div' elements inline elements, and those elements
are also non-replaced. 'height' doesn't apply to inline non-replaced
elements[1], so Mozilla is ignoring the values (as will any CSS
conformant browser). What you need is the 'display' value
'inline-block', which unfortunately isn't very well supported at this
point.
[1] <http://www.w3.org/TR/CSS21/visudet.html#q15>
--
Eric A. Meyer (http://www.meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
-- Martina Kosloff (http://www.mako4css.com/)