Jump to content
  • 0

width таблицы


cyklop77
 Share

Question

3 answers to this question

Recommended Posts

  • 0

да, я знаю, что он обединяет ячейки. но не пойму зачем он здесь нужен? дело в том, что блок tr имеет width 210px и содержит всего 3 ячейки, каждой из которых явно прописана ширина

Edited by cyklop77
Link to comment
Share on other sites

  • 0

У ячеек таблиц вертикальная зависимость. Каждая нижняя ячейка соответствует верхней. Если вы растянули три верхние ячейки, то растянутся и нижние, но в вашем случае некуда девать контент в остальных ячейках, потому браузер высчитывает свою ширину ячейкам. А вот как он ее высчитывает - это надо почитать в спеке или спросить у Selenit'a.

*Еще допишу. Именно так, как вы хотите, сделает table-layout: fixed, который заставляет браузер в обязательном порядке читать размеры ячеек первой строки, но последствия его печальны. Остальной контент он выместит за пределы таблицы, либо наложит его один над другой.

Edited by Softlink
Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy