Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Learn More

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

Height property with html tables

  • 2 antwurd
  • 4 hawwe dit probleem
  • 1 werjefte
  • Lêste antwurd fan Luzaritz

more options

Using nested tables to solve problems of horizontal alignments , I used the height=100% property for a table inside a td. The inner table doesn't fit the outer td's height, but simply adapts to the height of its contents, and is centered into the outer td. Using valign="top" for the outer td does align the inner table to the top, but this is just a bypass. This is not what I expected, since according to W3Schools, using % "Sets the height in percent of the surrounding element (example: height="50%")" (http://www.w3schools.com/tags/att_td_height.asp). I am using Firefox 36 with Windows 7.

Thank you for clarifying this point (I could see that Chrome behaves the same way).

Best regards

Luzaritz

Using nested tables to solve problems of horizontal alignments , I used the height=100% property for a table inside a td. The inner table doesn't fit the outer td's height, but simply adapts to the height of its contents, and is centered into the outer td. Using valign="top" for the outer td does align the inner table to the top, but this is just a bypass. This is not what I expected, since according to W3Schools, using % "Sets the height in percent of the surrounding element (example: height="50%")" (http://www.w3schools.com/tags/att_td_height.asp). I am using Firefox 36 with Windows 7. Thank you for clarifying this point (I could see that Chrome behaves the same way). Best regards Luzaritz

Alle antwurden (2)

more options

Setting the height of the surrounding element refers to the surrounding html tag, the element is within a table so this can be confusing. When you say horizontal, I will assume you mean vertical as you are talking about the height of the table.

Table elements take on the style of the table over the css style sheet. However since Chrome behaves the same way I do not understand the question.

more options

When I define 100% for a table height (table height="100%"), and this table is an INNER table defined within a CELL (this cell is of course defined with a "td", inside a "tr", inside a "tbody/table" for the OUTER table), I expect the height of the INNER table will take on the height of the CELL within wich it is defined (the surrounding element is the cell). But this is not what happens. The height of the INNER table is just dependent on its OWN contents. I use this to try to get HORIZONTAL alignment across INNER tables defined into each cell of one row, defining ONE inner table into each cell (Then to obtain left VERTICAL alignment for items inside each INNER table, defining one row, then several cells, into each of these inner tables). This may seem a little tricky, but this is HOW I NEED it works. But it doesn't. And this is why I use the "valign=top" property for the surrounding cells, in order to align HORIZONTALLY the inner tables (each defined within each cell) of one same row. Now, just checking that Chrome behaves the same way doesn't mean there is no problem, but only that Chrome has the same problem. I hope this will help understand what I think is a problem of compliance with the "height=100%" property.

Best regards