Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why won a percentage height set on a DIV element work?

div element height PERCENTAGE
0
Posted

Why won a percentage height set on a DIV element work?

0

Some of the examples in the book utilize a percentage value to set the height property for a DIV element. This worked fine in Internet Explorer 5.5, as well as Netscape 6 and Opera 5. It doesn’t work, however, in Internet Explorer 6, which simply ignores a height property if it is set using a percentage value. The solution is simply to avoid using percentages to set the heights of block elements. Using ems is probably a better choice, anyway, when creating a fluid layout; if creating a pixel-perfect layout, then just use pixels to set element heights.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123