Reply to Clearfix problem

Your name:

Reply:


Posted by luigi7up on 04/02/07 10:45

I'm working on two coulumns layout. Left div contains menu and basket
while right contains main content...

<body>
<div id="wrap">
<div id=left>
<ul id=menu>
</ul>
</div>
<div id=right>
</div>
</div>
<body>
In right div (content) I have div with image floated to left. Image
float doesn't work well, of course, so I add class clearfix to that
div with floated element. It should be streching vertically just
enough to hold floated image and text within that div but it stretches
too much. I noticed that it spreads vertically to dimensions of
content of left div where my menu is. So, if I add things to my left
column my floated div is spreading more and more...
Funny thing is that if I have two divs in right column second div has
no problems.

Do you have any idea what seems to be the problem?

Netko zna o čemu je riječ?

/*
******************************
***** 1.2. Clearing floats *****
******************************
*/

..clearfix:after {
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}

..clearfix {display:inline-block;}
/* Hide from IE Mac \*/
..clearfix {display:block;}
/* End hide from IE Mac */

[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

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