The attribute of the <td> - valign="top" does not work for me. The problem is that this attribute works only when some property of the padding 0 or height 100% type is set in the body or table css - in general, some thing that is not logically related to it, but I forgot that exactly!

Who remembers how it turns on?

  • Maybe you need to set the height of the cell, for example, <td height="200"> . - MasterAlex
  • not that, there is another - dantelol

1 answer 1

Why write styles in html , if you have css for this

Example http://jsfiddle.net/aehfktLp/

 <table> <tr> <td>Кто помнит, как это включается?</td> <td>Кто помнит, как это включается?</td> <td>У меня не работает атрибут тега td- valign="top" (раньше работало все, я, помню, находил решение этой проблемы).</td> <td>Кто помнит, как это включается?</td> </tr> <tr> <td>Кто помнит, как это включается?</td> <td>Кто помнит, как это включается?</td> <td>У меня не работает атрибут тега td- valign="top" (раньше работало все, я, помню, находил решение этой проблемы).</td> <td>Кто помнит, как это включается?</td> </tr> <tr> <td>Кто помнит, как это включается?</td> <td>Кто помнит, как это включается?</td> <td>У меня не работает атрибут тега td- valign="top" (раньше работало все, я, помню, находил решение этой проблемы).</td> <td>Кто помнит, как это включается?</td> </tr> </table> table { border-collapse: collapse; border-spacing: 0; width: 100%; } table td, table td * { vertical-align: top; padding: 5px; background: #000; color: #fff; font-family: sans-serif; font-size: 13px; border: 1px solid #fff; } 
  • Please copy the entire code directly into the message. Links to jsfiddle can only serve as a supplement. Answers should be self-sufficient in case external links are suddenly covered. - Athari