This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > August 2006 > Float Left TeaxtAlign Center





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Float Left TeaxtAlign Center
Dessip@gmail.com

2006-08-23, 6:58 pm

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>

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews