Metus Posted March 19, 2011 Report Share Posted March 19, 2011 (edited) Вот код://————————————————————————————————————————<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Тест1</title> </head> <body> <style> body, html { width: 100%; height: 100%; } body { margin: 0px; } </style> <table style="width: 100%; height: 100%;"> <tr> <td style="border: 1px solid black;"> <table style="width: 100%; height: 100%; border: 1px solid red;"> <tr> <td> Контент </td> </tr> </table> </td> </tr> </table> </body></html>//————————————————————————————————————————Именно при доктайпе как xhtml и именно для Оперы с IE таблица внутри ячейки не растягивается по высоте.В чём моя ошибка? Edited March 19, 2011 by Metus Quote Link to comment Share on other sites More sharing options...
0 wildhind Posted March 20, 2011 Report Share Posted March 20, 2011 А если ячейке задать height: 100%, то и таблица тоже станет 100% в высоту. Почему так — не знаю, но уже встречался такой глюк. Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted March 20, 2011 Report Share Posted March 20, 2011 Причём тут глюк? Всё правильно. Внутренняя таблица не знает, что такое 100% и откуда их брать, она опирается на родителя, у которого НЕ задана высота. Quote Link to comment Share on other sites More sharing options...
0 wildhind Posted March 20, 2011 Report Share Posted March 20, 2011 но ячейка-то имеет высоту 100%, это даже видно в DragonFly. Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted March 20, 2011 Report Share Posted March 20, 2011 но ячейка-то имеет высоту 100%, это даже видно в DragonFly.А он ставит, но где то в душе понимает, что это неправильно Quote Link to comment Share on other sites More sharing options...
0 wildhind Posted March 20, 2011 Report Share Posted March 20, 2011 какой он противоречивый и понятливый Как человек Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted March 20, 2011 Report Share Posted March 20, 2011 какой он противоречивый и понятливый Как человек Quote Link to comment Share on other sites More sharing options...
0 Metus Posted March 20, 2011 Author Report Share Posted March 20, 2011 Всё понял, спасибо.Для ячейки явно выстаивть высоту и всё работает Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted March 20, 2011 Report Share Posted March 20, 2011 Всё понял, спасибо.Для ячейки явно выстаивть высоту и всё работаетИменно Quote Link to comment Share on other sites More sharing options...
Question
Metus
Вот код:
//————————————————————————————————————————
//————————————————————————————————————————
Именно при доктайпе как xhtml и именно для Оперы с IE таблица внутри ячейки не растягивается по высоте.
В чём моя ошибка?
Edited by MetusLink to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.