Tuesday 15 March 2011

html - CSS let floats fill unused space -


Hello I have a little CSS float problem

I have 3 Floating Divs as seen below < / P>

  & lt; Div style = "width: 200px;" & Gt; & Lt; Div style = "float: left; width: 90px; height: 50px;" & Gt; Div 1 & lt; / Div & gt; & Lt; Div style = "float: left; width: 90px; height: 90px;" & Gt; DIV 2 & lt; / Div & gt; & Lt; Div style = "float: left; width: 90px; height: 50px;" & Gt; Div 3 & lt; / Div & gt; & Lt; / Div & gt;   

What do I need is that the div number 3 is floating in 1 space empty space.

Is it possible with CSS?

Your div 2 has not been left to right.

And write your CSS properly, not in the style div

  .b {float: right; Width: 90px; Height: 90px;}   

You can get rid of space by changing the size of the holding window or adding padding-right: 20 px; Or margin-right: 20px; Based on what you want. The difference between padding and margins for a different post.

  .b {float: right; Width: 90px; Height: 90px; Margin-right: 20px;}    

No comments:

Post a Comment