I have a container DIV with a fixed height and width (275x1000px). In this DIV I want to put multiple floating DIVs each with a width of 300px, and have a horizontal (x-axi
Use:
div#container {
overflow: auto;
}
Or add a clearing div below the three divs with the style:
{
clear: both
}
It sounds like you are doing gallery with div's?
What exactly are you using the divs for?
It may be easier to use a ul/li with spans inside of the li to get the same effect without all the headaches of floating divs.
My Ex:
div width: 850px gridview templatedcolumn ItemTemplate
<span class="buttonspanlt"></span><asp:Button ID="imgEditSave" runat="server" Text="Edit SubStatus" CssClass="buttoncenter" OnClick="imgEditSave_OnClick"/><span class="buttonspanrt"></span>
<span style="display:none;float:left;clear:left;" id="spangrdCancel" runat="server"><span class="buttonspanlt"></span><asp:Button ID="imgCancel" runat="server" Text="Cancel" class="buttoncenter"/><span class="buttonspanrt"></span></span>
end ItemTemplate end templatedcolumn end gridview end div
the button has left middle(actual button) right spans which where not floating as there was outer div with fixed width.
I had to use additional div with width 140px outside the button , inside the itemtemplate then it worked.
Hope this helps!!!
Thank You Harish