inline boxes

liunx

Guest
Hi,

Is there a way to make boxes go side by side like words w/o using absolute positioning. DIVs just get under each other no matter what. If I specify inline display property then they shrink to the size of a text line.
Is there any way at all to make boxes of the same size behave like words (that is, if it doesn't fit in a line, go on the next row)?

please advice

thanks in advanceYou need float. It's pretty complex, but here goes:

Use {float:left;} - This makes boxes act like text. They will spill over if they don't fit a line. Only I had problems with them suddenly going down instead of along.

You can also use this to force a new line: {clear:both;}

The best thing to do is read up on how to use them. Here is a site that is very helpful:

<!-- m --><a class="postlink" href="http://positioniseverything.netyou">http://positioniseverything.netyou</a><!-- m --> may need to specify a width for the float .

e.g.
{width:150px; float:left;}

you can use % as well
 
Back
Top