Oops left them out.
I solved the first problem by making one of the img as a background. But I'm still wondering if it's possible to relatively position an image whose width is wider than the containing div's width without expanding the width of the containing div in IE.
In my code, the reason i have <div id="headercontent"> and <div id="headercontent_bg"> is because one of it provides the faux column background which is made of 2 columns of solid colors, while the other div's background is non-repeating and provides the gradiant part of the background. I've also cut an image into 3 (.header_* classes) so its width/height wont be larger than its containing divs'.
Code:
* {
margin: 0px;
padding: 0px;
}
body {
font: 1em Arial, Helvetica, sans-serif;
}
p {
font-size: .7em;
color: #7f757a;
}
h1 {
font-size: 1.2em;
color: #8f9bd8;
}
#mainwrap {
width: 987px;
margin: 0px auto;
}
#headercontent {
height: 92px;
background-image: url(images/header_bg2.jpg);
background-repeat: repeat-x;
}
#headercontent_bg{
width: 987px;
background-image: url(images/header_bg.jpg);
background-position: 0 75;
background-repeat: no-repeat;
}
#midcontent {
width: 987px;
float: left;
background-image: url(images/bg_fadedgirl.jpg);
background-repeat: no-repeat;
}
#midcontent_solidbg {
width: 987px;
float: left;
background-image: url(images/bg_solid.jpg);
background-repeat:repeat-y;
}
#leftcontent {
width: 214px;
float: left;
/*background-color: blue;*/
}
.header_top {
position: relative;
top: 0px;
left: 0px;
}
.header_left {
position: relative;
top: -15px;
left: 0px;
}
.header_right {
position: relative;
top: -419px;
left: 214px;
}
#rightcontent {
width: 773px;
float: left;
/*background-color: red;*?
}
Code:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>aaa</title>
<link href="style.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div id="mainwrap">
<div id="headercontent">
<div id="headercontent_bg">
<img src="images/header_top.jpg" width="315" height="77" class="header_top" />
</div>
</div>
<div id="midcontent_solidbg">
<div id="midcontent">
<div id="leftcontent">
<img src="images/header_left.jpg" width="214" height="400" class="header_left" />
<img src="images/header_right.jpg" width="88" height="50" class="header_right" />
</div> <!-- end leftcontent -->
<div id="rightcontent">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<h1>Welcome to</h1>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>asdasdddddddddddddddddddddddddddddddddddddddddddd</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
<p>a</p>
</div> <!-- end rightcontent -->
</div> <!-- end midcontent -->
</div> <!-- end midcontent_solidbg -->
</div> <!-- end mainwrap -->
</body>
</html>
Bookmarks