Note that there are some explanatory texts on larger screens.

plurals
  1. PODIVs inside another DIV inside another DIV with CSS
    primarykey
    data
    text
    <p>Here's what I'm trying to achieve:</p> <p><img src="https://i.stack.imgur.com/rAjdd.jpg" alt="Preview"></p> <p>This is the HTML code I wrote:</p> <pre><code>&lt;div id="wrapper"&gt; &lt;!--This is the Div 1 in the picture--&gt; &lt;div id="topBar"&gt; &lt;!--This is the Div 2 in the picture--&gt; &lt;div id="logo"&gt;&lt;/div&gt; &lt;!--This is the Div 4 in the picture--&gt; &lt;div id="menu"&gt;&lt;/div&gt; &lt;!--This is the Div 5 in the picture--&gt; &lt;div id="login"&gt;&lt;!--This is the Div 6 in the picture--&gt; &lt;div class="loginElement"&gt;&lt;input type="text" id="txtUsername" class="loginElementBox" size="29" value="User name" onClick="usernameFocus()" onBlur="usernameBlur()" /&gt;&lt;/div&gt; &lt;div class="loginElement"&gt; &lt;input type="text" name="txtFakePassword" id="txtFakePassword" class="loginElementBox" value="Password" onfocus="passwordFocus()" /&gt;&lt;input style="display:none;" type="password" id="txtPassword" class="loginElementBoxFocus" onBlur="passwordBlur()" /&gt; &lt;/div&gt; &lt;input type="button" id="btnLogin" value="" onclick="login()"&gt;&lt;br /&gt; &lt;span id="lblError"&gt;&lt;/span&gt; &lt;/div&gt;&lt;!--Closing "login"--&gt; &lt;/div&gt;&lt;!--Closing "topBar"--&gt; &lt;div id="central"&gt; &lt;!--This is the Div 3 in the picture--&gt; &lt;div id="top3"&gt; &lt;!--This is the Div 7 in the picture--&gt; &lt;/div&gt; &lt;/div&gt;&lt;!--Closing "central"--&gt; &lt;/div&gt;&lt;!--Closing "wrapper"--&gt; </code></pre> <p>and this is the CSS:</p> <pre><code>#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; } </code></pre> <p>Inside Div 6 I have a few more Divs It all just comes out scrambled. Div 2 and Div 3 look OK inside Div 1, and Div 7 looks nice inside Div 3, but once I add Divs 3, 4, 5... I tried several things, with float, position etc - nothing worked, I can't arrange it as I want it. Any ideas how to make it work?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload