I have two divs, one inside of the other:
<div id="main_content">
<div id="page_title">
<h1>This is the title of the page</h1>
</div>
Halo halo halo
</div>
And the CSS:
/****** MAIN ******/
#main_content {
position: relative;
top: -60px;
z-index: 1;
background-color: #FFFFFF;
width: 1248px;
margin: 0 auto;
}
/****** END OF: MAIN ******/
/****** PAGE TITLE ******/
#page_title {
position: relative;
margin-top: 100px;
background: red url("img.png") no-repeat 50% 50%;
height: 20px;
width: 1300px;
}
The problem is that when I add the "margin-top: 100px;" to the #page_title (the inner div), it "pushes down" the outer div as well by 100 px, so I can see the body color under it. I would like to keep the outer div as it is = like it had no margin at all. How can I achieve this? I found that overflow:auto should solve this (it kinda does) but it puts the outer div lower than it would normally be. Is there some other way? Thanks a lot!