Here is what I am trying to achieve:
This is the HTML code I wrote:
<div id="wrapper"> <div id="topBar"> <div id="logo"></div> <div id="menu"></div> <div id="login"> <div class="loginElement"><input type="text" id="txtUsername" class="loginElementBox" size="29" value="User name" onClick="usernameFocus()" onBlur="usernameBlur()" /></div> <div class="loginElement"> <input type="text" name="txtFakePassword" id="txtFakePassword" class="loginElementBox" value="Password" onfocus="passwordFocus()" /><input style="display:none;" type="password" id="txtPassword" class="loginElementBoxFocus" onBlur="passwordBlur()" /> </div> <input type="button" id="btnLogin" value="" onclick="login()"><br /> <span id="lblError"></span> </div> </div> <div id="central"> <div id="top3"> </div> </div> </div>
and this is CSS:
#wrapper { width:800px; background-color:#f2f2e8; position:relative; left:50%; margin-left:-400px; border-radius: 10px; -moz-border-radius: 10px; padding:5px; } #topBar { width:780px; border: 1px solid; border-color: #dbd9ca; border-radius: 10px; -moz-border-radius: 10px; margin:5px; padding:5px; } #logo { width:153px; height:66px; background-image:url(../images_ui/logo2.png); background-repeat:no-repeat; background-position:left center; margin:5px; padding:5px; float:left; } #menu { float:left; width:400px; position:relative; } #login { float:right; width:80px; } #central { width:780px; border: 1px solid; border-color: #dbd9ca; border-radius: 10px; -moz-border-radius: 10px; margin:5px; margin-top:20px; padding:5px; }
Inside Div 6 I have a few more Divs. It all just comes off board. Div 2 and Div 3 look fine inside Div 1, and Div 7 looks great inside Div 3, but as soon as I add Divs 3, 4, 5 ... I tried a few things with a float, position, etc. - nothing worked, I arrange it as I want. Any ideas how to make it work?
source share