Forum Moderators: open

Message Too Old, No Replies

fixing table cell height in ie6

         

esllou

11:32 am on Mar 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have a table like this

¦----------------------------------¦
¦........................................¦
¦----------------------------------¦
¦........................................¦
¦........................................¦
¦........................................¦
¦........................................¦
¦----------------------------------¦

more or less....the problem is that in IE, the top row changes depending on what I have content wise in the second bigger cell. I have tried height="30" and in css height:30px; applying to that cell...but neither work.

FF obeys the height requirement but IE stretches it if the main cell has very few lines of text in.

workaround?

tedster

7:05 pm on Mar 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wish I had some nice, general rule you could use - but unfortunately I do not. Different layouts can have very specialized requirements and different browsers have some pretty flexible interpretations of various rules.

Controlling table cell height cross-browser can be a tough road. The W3C allows browsers and other user agents a lot of leeway in their rendering of tables. (See [w3.org...] )

This is as it should be, since otherwise different parts of the mark-up could give mutually conflicting/contradicatory rules and lock up the rendering engine.

So it's mostly an experimental game, I think. From your comments, it sounds like you may also have some rules that are trying to make the table fill the window - is this the case?

esllou

1:05 am on Mar 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



no...I don't have any sort of height:100% going on either in the html or css.

I have added a couple of line breaks to the main content cell on pages where there wasn't much text to fill it...that seems to have solved the problem.

I don't get why the height="x" is ignored where the width command seems to be fine.