I've been struggling to achieve a specific positioning using CSS:
However, after numerous attempts over several days, the best result I could obtain looks like this:
Could you lend me a hand in achieving the desired positioning, considering these factors:
- The red comments in the "try" picture (refer to JSFiddle below) that highlight some major constraints
- The need for the positioning to work on IE8+, FF10+, Chrome, Opera, Safari (with CSSPie and selectivizr for IE8 compatibility)
Here is the JSFiddle along with the following code snippets:
HTML
<body>body (all divs may have some padding, margin, and border. All divs adjust their height to their content.)
<div id="globalcontainer"><span class="important">#globalcontainer (fixed width, not really centered into body : see center)</span>
<div id="header">#header (100%)</div>
...
<DIV class="bloc" style="width:90px;">bloc</div>
</div>
</div>
</div>
<div id="footer">#footer (100%)</div>
</div>
</body>
CSS
* {
font-family:Arial;
font-size:11px;
border:1px solid black;
padding:10px;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
background-color:rgba(125,125,125,0.1);
}
...
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}