Reply to Re: How to have columns with equal height?

Your name:

Reply:


Posted by Ben C on 01/03/08 22:26

On 2008-01-03, Fister <nej@tak.dk> wrote:
> I'd like for the div.something-else below the three columns to be placed
> 25 pixels below the coloumn with the longest text. Unfortunately with the
> code below it only relates to the center-column. That causes problems if
> the text in left- or right-column are long. How can I fix this?

Put another div around #something-else, with clear: both and
padding-top: 1px set on it.

Then set margin-top on something-else to only 24px (because of the 1px
of padding).

[...]

Like this:

<div style="clear: both; padding-top: 1px">
> <div id="something-else">
> something else something else something else
> </div>
</div>

You need the other div (rather than just setting clear on
something-else) because otherwise its 25px margin-top is absorbed by the
clearing offset.

Padding-top of 1px prevents margin collapsing between the new div and
#something-else.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация