PDA

View Full Version : problem with float



esthera
Jan 29th, 2010, 09:19 AM
http://www.kosher kas ual.com/new/testc.html

i want to have 4 in a row -- why is it only showing 3?

jenius
Jan 29th, 2010, 09:50 AM
Floated items move down to the next row when you are out of space. Try increasing the size of the containing div or decreasing the size of each floated element. If you do not already have this set a width and height for each of the floated elements.

The elements I'm talking about are spans within the div "breadcrumbsn"

If you do not already have properties listed for these spans, the way to do it would be



#breadcrumbsn span {
(properties here)
}


Your elements are all the same height though, which is good, because now you will not run into any problems with row stacking :D

esthera
Jan 29th, 2010, 09:51 AM
if you see

http://www.koshe rcas ual.com/new//index.php?cPath=24_25_60&osCsid=nvgmvrrvh1c1jqskoqaqd8ogk3

elements are the same size using the same css and they show 4 on a line
what is the difference?

abduraooft
Jan 29th, 2010, 10:46 AM
http://www.kosher kas ual.com/new/testc.html

i want to have 4 in a row -- why is it only showing 3?

Try
.product-listing ul li {/*stylesheet.css (line 1380)*/
float:left;
margin:0 2px 5px 0;
width:180px;
}

esthera
Jan 29th, 2010, 10:51 AM
thanks so much! that worked!

jenius
Jan 29th, 2010, 08:21 PM
it did, but it also messed up your spacing. if you look closely, the first three are spaced with a small margin, and the fourth one (and all below) doesn't have that bit of space. A better solution would have been to slightly increase the width of your div as I suggested. But you can accommodate this new situation by changing the spacing on the first three as well.