dimych Posted January 23, 2009 Report Share Posted January 23, 2009 Всем привет!Подскажите, плз, как с помощью слоев раилизовать следующее:<table border="0"> <tr> <td align="right" valign="bottom"><img src="icon.gif" alt="12" /></td> <td align="left" valign="bottom">Такое объявление, прогнозирует The Times, вскоре появится на сайте NASA</td> </tr> </table>т.е., чтобы и картинка и текст были всегда выравнены по низу независимо от кол-ва текста. Quote Link to comment Share on other sites More sharing options...
0 Vlad Posted January 24, 2009 Report Share Posted January 24, 2009 vertical-align: bottom;Добавь эту строку к стилю ячейки. Quote Link to comment Share on other sites More sharing options...
0 dimych Posted January 24, 2009 Author Report Share Posted January 24, 2009 vertical-align: bottom;Добавь эту строку к стилю ячейки.Имеется в виду, избавиться от таблицы и сделать все слоями... Quote Link to comment Share on other sites More sharing options...
0 Vlad Posted January 24, 2009 Report Share Posted January 24, 2009 С выравниванием по низу у слоев большие проблемы. Так что в данном случае оптимальнее таблицей будет сделать. Quote Link to comment Share on other sites More sharing options...
0 ps1 Posted February 3, 2009 Report Share Posted February 3, 2009 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <title></title><style type="text/css">div.main { position: relative; background: #ccc; width: 400px; height: 600px;}div.main div.bottom { background: #33C;}div.main div.bottom_left { position:absolute; bottom:0; width: 200px; background: #1CC;}div.main div.bottom_right { position:absolute; bottom:0; width: 200px; margin-left: 200px; background: red;}</style></head><body><div class="main"> <div class="bottom"> <div class="bottom_left">aaa</div> <div class="bottom_right">1<br/>2<br/>3</div> </div></div></body></html> Quote Link to comment Share on other sites More sharing options...
0 SelenIT Posted February 4, 2009 Report Share Posted February 4, 2009 (edited) Еще можно через display:inline-block + vertical-align:bottom (или baseline) выравнять. Правда, для IE6-7 и FF2- понадобятся хаки (недавно про это было много статей, в частности, на хабрахабре). И нужно учитывать, что пробелы между тегами при такой раскладке значимы. Edited February 4, 2009 by SelenIT Quote Link to comment Share on other sites More sharing options...
Question
dimych
Всем привет!
Подскажите, плз, как с помощью слоев раилизовать следующее:
т.е., чтобы и картинка и текст были всегда выравнены по низу независимо от кол-ва текста.
Link to comment
Share on other sites
5 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.