Forum Moderators: not2easy
<div id="site-outline">
<div id="post-it">Content for id "post-it" Goes Here</div>
<div id="header"></div>
<div class="clear"></div>
</div>
body {
margin-top: 0px;
margin-bottom: 0px;
background-color: #000000;
}
#site-outline {
width: 950px;
margin-right: auto;
margin-left: auto;
}
#header {
height: 300px;
width: 900px;
margin-right: auto;
margin-left: auto;
margin-top: 25px;
background-color: #000099;
}
#post-it {
background-color: #CC0066;
float: left;
height: 150px;
width: 200px;
margin-left: 50px;
display: inline;
}
.clear {
clear: both;
margin: 0px;
padding: 0px;
display: inline-block;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<html>
<head>
<style>
body {
margin-top: 0;
margin-bottom: 0;
background-color: #000;
}
#site-outline {
width: 950px;
margin-right: auto;
margin-left: auto;
}
#header {
height: 300px;
width: 900px;
margin-right: auto;
margin-left: auto;
margin-top: 25px;
background-color: #009;
}
#post-it {
background-color: #c06;
float: left;
height: 150px;
width: 200px;
margin-left: 50px;
display: inline;
}
/**********
.clear {
clear: both;
margin: 0px;
padding: 0px;
display: inline-block;
}
*/
</style>
</head>
<body>
<div id="site-outline">
<div id="header">
<div id="post-it">Content for id "post-it" Goes Here
</div>
</div>
<!--##########
<div class="clear"></div>
-->
</div>
<!--##########
Hi everyone! I've been having a problem getting a simple float and display to work in both IE and Firefox. I want the pink box to be at the top of the screen and the blue box to be 25px from the top. I've tried everything I know and can't get it done. I've been reading about the IE Box Model and the problems IE has with display: inline. Any help would be wonderful, thanks!
-->
</body>
</html>
body {
margin: 0;
background-color: #000;
}
#site-outline {
position: relative;
width: 950px;
margin: 0 auto;
padding: 25px 0 0;
}
#post-it {
position: absolute;
top: 25px;
left: 50px;
height: 150px;
width: 200px;
background-color: #C06;
}
#header {
height: 300px;
width: 900px;
background-color: #009;
}
<div id="site-outline">
<div id="post-it">Content for id "post-it" Goes Here</div>
<div id="header">x</div>
</div>