470,588 Members | 2,159 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,588 developers. It's quick & easy.

Float Left TeaxtAlign Center

Hey,

The code that follows im having problems with, i think tis the CSS, but
i dont have a clue of fixing it, i have tried any things but without
the float:Left there is no point the folloing code lays the page out
like so:

| obj1 obj2 obj4 obj6 obj8
|
| obj3 obj5 obj7 obj9
|

obj1 Is in a DIV On its own
obj2 and 3 are in a div of there own
obj4 and 5 are in a div of there own
obj6 and 7 are in a div of there own
obj8 and 9 are in a div of there own

But it dont align it center,

And here what i need it to look like:
| obj1 obj2 obj4 obj6 obj8
|
| obj3 obj5 obj7 obj8
|

I have used a outer div to encapsulate all of the inner DIV's, and i
used the inner divs like so, so that it groups and displays the objects
like so, otherwise it would just stack then down the screen, Unless
there is another way that i dont know aobut (Except useing Tables, but
that is my last resort)

Thank you for any help
Chris

Code ===============================================
CSS:
div#starting, div#import, div#Export, div#Crop, div#Year
{
clear: none;
float: left;

}

div#Center
{
text-align:center;
}

HTML:
<div id="Center">
<div id="year"><asp:label id="lblYear" CssClass="lblMain"
Runat="server">Year:</asp:label><br>
<asp:listbox id="lsbYear" CssClass="lsbMain" Runat="server"
SelectionMode="Multiple"></asp:listbox></div>
<div id="Starting"><asp:label id="lblRegion" CssClass="lblMain"
Runat="server">Region</asp:label><br>
<asp:listbox id="lsbRegion" CssClass="lsbMain" Runat="server"
SelectionMode="Multiple" AutoPostBack="True"></asp:listbox><br>
<asp:listbox id="lsbCountry" CssClass="lsbMain" Runat="server"
SelectionMode="Multiple"></asp:listbox></div>
<div id="Export"><asp:label id="lblExporting" CssClass="lblMain"
Runat="server">Exporting To:</asp:label><br>
<asp:listbox id="lsbExportRegion" CssClass="lsbMain"
Runat="server" SelectionMode="Multiple"
AutoPostBack="True"></asp:listbox><br>
<asp:listbox id="lsbExportingCountry" CssClass="lsbMain"
Runat="server" SelectionMode="Multiple"></asp:listbox></div>
<div id="Import"><asp:label id="lblImporting" CssClass="lblMain"
Runat="server">Importing From:</asp:label><br>
<asp:listbox id="lsbImportRegion" CssClass="lsbMain"
Runat="server" SelectionMode="Multiple"
AutoPostBack="True"></asp:listbox><br>
<asp:listbox id="lsbImportingCountry" CssClass="lsbMain"
Runat="server" SelectionMode="Multiple"></asp:listbox></div>
<div id="Crop"><asp:label id="lblCrop" CssClass="lblMain"
Runat="server">Crop:</asp:label><br>
<asp:listbox id="lsbCropType" runat="server"
SelectionMode="Multiple" AutoPostBack="True"
cssclass="lsbMain"></asp:listbox><br>
<asp:listbox id="lsbCrop" runat="server" SelectionMode="Multiple"
cssClass="lsbMain"></asp:listbox></div>
<div id="SelectButton"><asp:button id="butSelect" runat="server"
Text="Select"></asp:button><br>
<asp:button id="butRestart" runat="server"
Text="Restart"></asp:button></div>
</div>

Aug 23 '06 #1
0 2562

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Jeff Thies | last post: by
2 posts views Thread by Gustav Medler | last post: by
3 posts views Thread by Ian Watts | last post: by
1 post views Thread by Robert | last post: by
7 posts views Thread by alex.krupp | last post: by
2 posts views Thread by Ian N | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.