richcleverley
MIS
Hi all,
Playing around with some ideas inspired by various other sites.
I want a fixed background in a container div and it works fine in FF but of course IE won't have it. I know it's a ducumented bug in IE where if background-attachment:fixed; is applied to anything but the body it doesn't like it but I was wondering if anyone knows how to get around it.
Here's my code
Very basic code for the moment but it's just an idea for future projects I want to get working.
Thanks in advance,
Richard
Playing around with some ideas inspired by various other sites.
I want a fixed background in a container div and it works fine in FF but of course IE won't have it. I know it's a ducumented bug in IE where if background-attachment:fixed; is applied to anything but the body it doesn't like it but I was wondering if anyone knows how to get around it.
Here's my code
Code:
CSS
body {
background-color:#292421;
}
.maincontent{
background-image:url('ariel.jpg') ;
background-attachment: fixed;
margin: 0 auto;
width:360px;
border:solid 1px #FFCC00;
}
.boxcontent{
padding:2px;
width:354px;
height:200px;
background-color:#FFFFFF;
margin-bottom:30px;
border:solid 1px #FFCC00;
}
#container{
width: 703px;
position: absolute; left: 50%;
background: transparent url(bg-bio.gif) no-repeat 0px 50px;
margin-left: -352px;}
Code:
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<div class="maincontent">
<div class="boxcontent">
</div>
<div class="boxcontent">
</div>
<div class="boxcontent">
</div>
<div class="boxcontent">
</div>
</div>
</div>
</body>
</html>
Very basic code for the moment but it's just an idea for future projects I want to get working.
Thanks in advance,
Richard