xDev Posted January 20, 2011 Report Share Posted January 20, 2011 (edited) <!-- block --><table border="1" width="100"><tr><td>Первая</td></tr><tr></td>Вторая</td></tr></table><!-- block -->Как сделать поле от топа второй ячейк? Я так понимаю в таблицах margin-top не фурычит.пардон за ошибку в заголовке. Edited January 20, 2011 by xDev Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted January 20, 2011 Report Share Posted January 20, 2011 <!-- block --><table border="1" width="100"><tr><td>Первая</td></tr><tr></td>Вторая</td></tr></table><!-- block -->Как сделать поле от топа второй ячейк? Я так понимаю в таблицах margin-top не фурычит.пардон за ошибку в заголовке.Поставь класс нужной ячейке, и к нему обращайся. Quote Link to comment Share on other sites More sharing options...
0 xDev Posted January 21, 2011 Author Report Share Posted January 21, 2011 эх эти таблици, никогда с ними не связывался.не работает margin-top<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html> <head> <title>XHTML</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <style type="text/css"> td {border:1px solid black} </style> </head><body><table cellpadding="0" cellspacing="0" width="200"><tr><td>Батон</td></tr><tr><td style="margin-top: 5px;">Ржаной</td></tr></table></body></html> Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted January 21, 2011 Report Share Posted January 21, 2011 поставь паддинг-топ Quote Link to comment Share on other sites More sharing options...
0 xDev Posted January 21, 2011 Author Report Share Posted January 21, 2011 (edited) поставь паддинг-топпаддинг-топ не в тему, между ячейками не будет расстоянияя вот че думаю, поставлю я между этими строчками еще одну строчку, хотя будет не красиво в плане кода.Но все равно от других вариантов не откажусь, если они есть... а? Edited January 21, 2011 by xDev Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted January 21, 2011 Report Share Posted January 21, 2011 cellpadding="0" cellspacing="0" - вот это зачем ставил? Quote Link to comment Share on other sites More sharing options...
0 xDev Posted January 21, 2011 Author Report Share Posted January 21, 2011 cellpadding="0" cellspacing="0" - вот это зачем ставил?эх я дубина, спасибо! Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted January 21, 2011 Report Share Posted January 21, 2011 эх я дубина, спасибо!Нее, нее, не сваливай, лови вариант<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html> <head> <title>XHTML</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <style type="text/css"> * { margin: 0; padding: 0;} table { border-collapse: collapse; width: 200px;} td {border:1px solid black} td.top { display: block; margin-top: 10px;} </style> </head><body><table><tr><td>Батон</td></tr><tr><td class="top">Ржаной</td></tr></table></body></html> Quote Link to comment Share on other sites More sharing options...
0 xDev Posted January 21, 2011 Author Report Share Posted January 21, 2011 Нее, нее, не сваливай, лови вариант<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html> <head> <title>XHTML</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <style type="text/css"> * { margin: 0; padding: 0;} table { border-collapse: collapse; width: 200px;} td {border:1px solid black} td.top { display: block; margin-top: 10px;} </style> </head><body><table><tr><td>Батон</td></tr><tr><td class="top">Ржаной</td></tr></table></body></html> Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted January 21, 2011 Report Share Posted January 21, 2011 Не стесняйся обращаться Quote Link to comment Share on other sites More sharing options...
0 Vlad Posted January 21, 2011 Report Share Posted January 21, 2011 Есть еще свойство border-spacing, но оно будет воздействовать на все ячейки по определению. Вообще, подобное можно и на слоях сверстать. Quote Link to comment Share on other sites More sharing options...
0 psywalker Posted January 21, 2011 Report Share Posted January 21, 2011 Вообще, подобное можно и на слоях сверстать.+1 Quote Link to comment Share on other sites More sharing options...
Question
xDev
Как сделать поле от топа второй ячейк? Я так понимаю в таблицах margin-top не фурычит.
пардон за ошибку в заголовке.
Edited by xDevLink to comment
Share on other sites
11 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.