finstah1
10-31-2007, 02:08 PM
I'm trying to get the blue box (03.gif) on the page below to move up to the top of the red box (00.gif). Right now blue is inside of the green (01.gif) div so that is as high as it will go. However when I try to add it to the red div, it breaks the layout. Am I missing a clear: both or something? What am I doing wrong? BTW, yellow is 02.gif
Here's the page:
http://www.mis2.udel.edu/~cleonard/!copland/athleticsgifts/test/test.html
Here's the code (ignore the ie stylesheets. They are not used for this portion of the design):
<!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">
<head>
<title>test</title>
<style>
html {height: 100%; overflow: auto;}
body {height: 100%; font: normal 12px/1.2 Arial, Helvetica, san-serif; color: #666; background: #063060 url("images/bgd_body.png"); padding:36px 0 36px 0;}
* {margin: 0;padding: 0;}
#wrap {width: 770px; height: auto; min-height: 98%; margin: 0 auto; /*padding-bottom: 40px;*/ text-align: left;}
* html #wrap {height: 98%;}
#headertop {width: 770px; height: 388px;}
h1#toptopImg {background: url("02.gif") no-repeat left top; height: 42px; text-indent: -2000px;}
h1#topImg {background: url("00.gif") no-repeat left top; height: 127px; text-indent: -2000px;}
#midImg {background: url("01.gif") no-repeat left top; height: 219px; width: 770px;}
#randomImg {float: right; height: 349px; width: 276px; border: none; margin: 0; padding: 0; z-index: 9000;}
</style>
<!--[if lte IE 7]>
<link rel="stylesheet" href="css/ie6.css" type="text/css" media="screen" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" />
<![endif]-->
</head>
<body>
<div id="wrap">
<div id="headertop">
<h1 id="toptopImg">this</h1>
<h1 id="topImg">that</h1>
<div id="midImg">
<div id="randomImg">
<script type="text/javascript">
images = new Array(1);
images[0] = "<img src='03.gif' alt='Athletes'>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</div>
</div>
</div>
<!--closes wrap-->
<div style="clear: both;"></div>
</div>
<!-- footer -->
<!--#include virtual="includes/footer.html" -->
</body>
</html>
Here's the page:
http://www.mis2.udel.edu/~cleonard/!copland/athleticsgifts/test/test.html
Here's the code (ignore the ie stylesheets. They are not used for this portion of the design):
<!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">
<head>
<title>test</title>
<style>
html {height: 100%; overflow: auto;}
body {height: 100%; font: normal 12px/1.2 Arial, Helvetica, san-serif; color: #666; background: #063060 url("images/bgd_body.png"); padding:36px 0 36px 0;}
* {margin: 0;padding: 0;}
#wrap {width: 770px; height: auto; min-height: 98%; margin: 0 auto; /*padding-bottom: 40px;*/ text-align: left;}
* html #wrap {height: 98%;}
#headertop {width: 770px; height: 388px;}
h1#toptopImg {background: url("02.gif") no-repeat left top; height: 42px; text-indent: -2000px;}
h1#topImg {background: url("00.gif") no-repeat left top; height: 127px; text-indent: -2000px;}
#midImg {background: url("01.gif") no-repeat left top; height: 219px; width: 770px;}
#randomImg {float: right; height: 349px; width: 276px; border: none; margin: 0; padding: 0; z-index: 9000;}
</style>
<!--[if lte IE 7]>
<link rel="stylesheet" href="css/ie6.css" type="text/css" media="screen" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" />
<![endif]-->
</head>
<body>
<div id="wrap">
<div id="headertop">
<h1 id="toptopImg">this</h1>
<h1 id="topImg">that</h1>
<div id="midImg">
<div id="randomImg">
<script type="text/javascript">
images = new Array(1);
images[0] = "<img src='03.gif' alt='Athletes'>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</div>
</div>
</div>
<!--closes wrap-->
<div style="clear: both;"></div>
</div>
<!-- footer -->
<!--#include virtual="includes/footer.html" -->
</body>
</html>