I am building a web site where i have two inside wrappers centered on screen using an outside wrapper that has margin left/right auto.
The structure looks like this
Code:
<body>
<div id="outside_wrapper">
<div id="inside_wrapper"></div>
<div id="sidebar"></div>
</div>
</body>
#outside_wrapper {
width: 993px;
margin: 25px auto;
}
#inside_wrapper {
width: 823px;
height: auto;
float: left;
}
#sidebar {
height: auto;
width: 155px;
margin-top: 224px;
float: left;
margin-left: 7px;
}
I am successful in centering the inside_wrapper and the sidebar with the invisible outside_wrapper but I also want to have a bottom and top margin of 25 px.
And now the problem - the top margin works without any problem on any browser, but the bottom margin only works with Firefox. All the other browsers (IE 8 and 9beta, Chrome, Safari, Opera) do not recognize the bottom margin.
I managed to get a bottom margin by giving a concrete height to the outside_wrapper instead of auto but that solution is no good for me since I am building a dynamic gallery and the inside_wrapper changes height depending on the image opened inside it.
Does someone know of a solution to this problem?