paddycobbett
asked on
How can I markup my html to achieve the desired result in my diagram?
Is there a clean way to achieve the result in the diagram with html and css? My goal is to have the header and page be centered, with some side panel off to the side. The key part is that the side panel should be vertically top aligned with the page div. I want a solution which will automatically work irrespective of the height of the header, i.e I'm not fixing the side panel top position to accommodate the header height. I am pulling in bootstrap (for other reasons) so feel free if necessary to reference (or not) anything from there. Please note that the header and page do have set widths, i.e should use or be embedded within a div with class "sitewidth".
Suggested starting points could be:
OR
Where can I put the side panel div to get the desired result?
Untitled.png
Suggested starting points could be:
<div class="centered sitewidth">
<div id="header"></div>
<div id="page"></div>
</div>
OR
<div id="header" class="centered sitewidth"></div>
<div id="page" class="centered sitewidth"></div>
Where can I put the side panel div to get the desired result?
Untitled.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, I think this solution was preferable for my particular case.
In bootstrap http://jsbin.com/uCusEVI/1/ you can see for larger screens you see your sample, but in smaller screens, the div's stack. It gets more complex to build the page, but makes it easier for mobile, tab and desktop users with one page.
Open in new window