You are here: Re: page structure question « HTML « IT news, forums, messages
Re: page structure question

Posted by Jim Moe on 05/05/06 21:43

vito wrote:
>
> After adopting the following style, i somehow achieve the effect of
> separating left & right blocks. however, i find when a browser window is
> rescaled to a smaller size, the right one will shift towards the bottom of
> the left part. is that the keyword "float" producing the result? how can i
> "fix" the right block? thanks.
>
> #nav { float:left; width:240px; }
> #main { float:right; width:500px; }
>
Yes, that is how floated elements work, a bit like inline elements.
Think about how words or images behave when there are two or more in a line.
There are a couple of ways to avoid the wrap:
- Set the widths to a percentage, or at least #main. The column(s) then
adjust to fit the available space (aka: fluid, liquid).
- Wrap the two columns in a div and set that div's width to a value
greater than the sum of the two elements' width + padding + margins +
borders (aka: fixed width, rigid).

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

 

Navigation:

[Reply to this 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

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