reubenb
11-07-2006, 12:14 PM
Hey guys
I'm new here, so I apologise if I do something wrong or write something!
Anyway,
I have a small query regarding CSS on my website.
It is valid CSS before you ask and th eproblem is - I have a shadow which is meant to appear on my website and in IE6 it does not. It is an image that is a height of 2 and then i want it to be height 100% so it fill sup the container it is in.
So, border-left and border-right are in the container 'page' and do not show up (but they do in opera, firefox, safari, ie7 and netscape)
Another problem in IE6, is the 100% width issue, anyone know how to fix this too? (all the widths that are 100% on the page, i tried to fix it in the IE6 fixes but it didnt work)
Any ideas?
The code is below
#header {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
background-image: url(images/headerbg.gif);
background-repeat:repeat-x;
height: 128px;
z-index: 1;
}
#logo {
position:relative;
width:231px;
height:94px;
margin-left: auto;
margin-right: auto;
background-image: url(images/logo.jpg);
}
#menuspacer {
position: absolute;
top:110px;
left: 0px;
height: 41px;
width: 100%;
z-index: 2;
border-bottom: 1px solid #FF8000;
}
#menubg {
position:relative;
top:116px;
height: 25px;
width: 500px;
margin-right: auto;
margin-left: auto;
z-index: 3;
border-left: 1px solid #FF8000;
border-right: 1px solid #FF8000;
border-bottom: 1px solid #FF8000;
background-color:#FFFFFF;
}
#menufakeborder {
position:relative;
top:89px;
height: 20px;
width: 500px;
margin-right: auto;
margin-left: auto;
z-index: 4;
border-left: 1px solid #ffcb9d;
border-right: 1px solid #ffcb9d;
}
#menucontainer {
position:relative;
top:0px;
height: 23px;
width: 500px;
margin-right: 0px;
margin-left: 0;
z-index: 5;
}
#menu li
{
display: inline;
list-style-type: none;
padding-right: 9px;
margin-left: auto;
margin-right: auto;
font-family:Arial, Helvetica, sans-serif;
font-weight:normal;
color: #550000;
text-decoration: none;
text-align:center;
z-index:6;
background-color:#FFFFFF;
}
#photobg {
position:absolute;
top: 152px;
left: 0px;
width:100%;
height: 161px;
background-image:url(images/horsebg.gif);
background-repeat:repeat-x;
z-index:2;
}
#horse {
position: relative;
top: 91px;
margin-left: auto;
margin-right: auto;
background-image:url(images/horse2.jpg);
width:1035px;
height: 161px;
z-index:2;
}
#border-right {
position:absolute;
top: 0px;
right: 137px;
width:22px;
height:97%;
background-image:url(images/border-right.gif);
background-repeat:repeat-y;
z-index:2324235;
background-color:#003366;
}
#border-left {
position:absolute;
top: 0px;
left: 137px;
width:20px;
height:97%;
background-image:url(images/border-left.gif);
background-repeat:repeat-y;
z-index:512;
}
#border-left-end {
position:absolute;
bottom: -18px;
left: 139px;
width:18px;
height:58px;
background-image:url(images/border-left-end.gif);
z-index:1;
}
#border-right-end {
position:absolute;
bottom: -18px;
right: 141px;
width:18px;
height:58px;
background-image:url(images/border-right-end.gif);
z-index:1;
}
#horse-tail {
position:absolute;
top: 161px;
left: 63px;
width:94px;
height:61px;
background-image:url(images/horsetail.gif);
z-index:1;
}
#footer {
position:absolute;
bottom: -175px;
width:100%;
height:22px;
background-image:url(images/footerbg.gif);
background-repeat:repeat-x;
left: 0px;
border-top: 1px solid #FF8000;
z-index:0;
}
#footer-text {
position:relative;
bottom: 3px;
width:420px;
height:22px;
margin:0 auto;
z-index:2;
border-right: 1px solid #FF8000;
border-bottom: 1px solid #FF8000;
border-left: 1px solid #FF8000;
background-color:#FFFFFF;
}
#page {
position: relative;
top: 0px;
left:0px;
margin-left: auto;
margin-right: auto;
height: auto;
width: 1035px;
z-index: 0;
}
and the fixes for IE at present:
#header {
width: 101.5%;
left:0px;
}
#photobg {
width: 101.5%;
left:0px;
}
#menuspacer {
width: 101.5%;
left:0px;
}
#menu
{
list-style-type: none;
margin-right: auto;
width: 498px;
margin:auto auto;
padding:0px 0;
}
#menu li {
display: inline;
padding-right: 10px;
margin-left: auto;
margin-right: auto;
text-align:center;
}
#footer {
width: 101.5%;
left:0px;
}
#border-right {
right: 136px;
}
and the HTML;
<div id="header">
<div id="logo"></div>
</div>
<div id="menuspacer"></div>
<div id="menubg">
<!--[if ! IE 6]><div id="menucontainer"><![endif]-->
<!--[if IE 6]><div id="menucontainer" align="center"><![endif]-->
<ul id="menu" align="center">
menu items
</ul>
</div>
</div>
<div id="menufakeborder"></div>
<div id="photobg"></div>
<div id="horse">
<div id="horse-tail"></div>
</div>
<div id="page">
<div id="border-right"></div>
<div id="border-right-end"></div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
content
<p> </p>
</div>
<p> </p>
<p> </p>
<div id="border-left"></div>
<div id="border-left-end"></div>
</div>
<div id="footer">
<div id="footer-text" align="center"><img src="images/footer.jpg" /></div>
</div>
Thanks so much and looking forward to a reply soon!!
:)
I'm new here, so I apologise if I do something wrong or write something!
Anyway,
I have a small query regarding CSS on my website.
It is valid CSS before you ask and th eproblem is - I have a shadow which is meant to appear on my website and in IE6 it does not. It is an image that is a height of 2 and then i want it to be height 100% so it fill sup the container it is in.
So, border-left and border-right are in the container 'page' and do not show up (but they do in opera, firefox, safari, ie7 and netscape)
Another problem in IE6, is the 100% width issue, anyone know how to fix this too? (all the widths that are 100% on the page, i tried to fix it in the IE6 fixes but it didnt work)
Any ideas?
The code is below
#header {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
background-image: url(images/headerbg.gif);
background-repeat:repeat-x;
height: 128px;
z-index: 1;
}
#logo {
position:relative;
width:231px;
height:94px;
margin-left: auto;
margin-right: auto;
background-image: url(images/logo.jpg);
}
#menuspacer {
position: absolute;
top:110px;
left: 0px;
height: 41px;
width: 100%;
z-index: 2;
border-bottom: 1px solid #FF8000;
}
#menubg {
position:relative;
top:116px;
height: 25px;
width: 500px;
margin-right: auto;
margin-left: auto;
z-index: 3;
border-left: 1px solid #FF8000;
border-right: 1px solid #FF8000;
border-bottom: 1px solid #FF8000;
background-color:#FFFFFF;
}
#menufakeborder {
position:relative;
top:89px;
height: 20px;
width: 500px;
margin-right: auto;
margin-left: auto;
z-index: 4;
border-left: 1px solid #ffcb9d;
border-right: 1px solid #ffcb9d;
}
#menucontainer {
position:relative;
top:0px;
height: 23px;
width: 500px;
margin-right: 0px;
margin-left: 0;
z-index: 5;
}
#menu li
{
display: inline;
list-style-type: none;
padding-right: 9px;
margin-left: auto;
margin-right: auto;
font-family:Arial, Helvetica, sans-serif;
font-weight:normal;
color: #550000;
text-decoration: none;
text-align:center;
z-index:6;
background-color:#FFFFFF;
}
#photobg {
position:absolute;
top: 152px;
left: 0px;
width:100%;
height: 161px;
background-image:url(images/horsebg.gif);
background-repeat:repeat-x;
z-index:2;
}
#horse {
position: relative;
top: 91px;
margin-left: auto;
margin-right: auto;
background-image:url(images/horse2.jpg);
width:1035px;
height: 161px;
z-index:2;
}
#border-right {
position:absolute;
top: 0px;
right: 137px;
width:22px;
height:97%;
background-image:url(images/border-right.gif);
background-repeat:repeat-y;
z-index:2324235;
background-color:#003366;
}
#border-left {
position:absolute;
top: 0px;
left: 137px;
width:20px;
height:97%;
background-image:url(images/border-left.gif);
background-repeat:repeat-y;
z-index:512;
}
#border-left-end {
position:absolute;
bottom: -18px;
left: 139px;
width:18px;
height:58px;
background-image:url(images/border-left-end.gif);
z-index:1;
}
#border-right-end {
position:absolute;
bottom: -18px;
right: 141px;
width:18px;
height:58px;
background-image:url(images/border-right-end.gif);
z-index:1;
}
#horse-tail {
position:absolute;
top: 161px;
left: 63px;
width:94px;
height:61px;
background-image:url(images/horsetail.gif);
z-index:1;
}
#footer {
position:absolute;
bottom: -175px;
width:100%;
height:22px;
background-image:url(images/footerbg.gif);
background-repeat:repeat-x;
left: 0px;
border-top: 1px solid #FF8000;
z-index:0;
}
#footer-text {
position:relative;
bottom: 3px;
width:420px;
height:22px;
margin:0 auto;
z-index:2;
border-right: 1px solid #FF8000;
border-bottom: 1px solid #FF8000;
border-left: 1px solid #FF8000;
background-color:#FFFFFF;
}
#page {
position: relative;
top: 0px;
left:0px;
margin-left: auto;
margin-right: auto;
height: auto;
width: 1035px;
z-index: 0;
}
and the fixes for IE at present:
#header {
width: 101.5%;
left:0px;
}
#photobg {
width: 101.5%;
left:0px;
}
#menuspacer {
width: 101.5%;
left:0px;
}
#menu
{
list-style-type: none;
margin-right: auto;
width: 498px;
margin:auto auto;
padding:0px 0;
}
#menu li {
display: inline;
padding-right: 10px;
margin-left: auto;
margin-right: auto;
text-align:center;
}
#footer {
width: 101.5%;
left:0px;
}
#border-right {
right: 136px;
}
and the HTML;
<div id="header">
<div id="logo"></div>
</div>
<div id="menuspacer"></div>
<div id="menubg">
<!--[if ! IE 6]><div id="menucontainer"><![endif]-->
<!--[if IE 6]><div id="menucontainer" align="center"><![endif]-->
<ul id="menu" align="center">
menu items
</ul>
</div>
</div>
<div id="menufakeborder"></div>
<div id="photobg"></div>
<div id="horse">
<div id="horse-tail"></div>
</div>
<div id="page">
<div id="border-right"></div>
<div id="border-right-end"></div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
content
<p> </p>
</div>
<p> </p>
<p> </p>
<div id="border-left"></div>
<div id="border-left-end"></div>
</div>
<div id="footer">
<div id="footer-text" align="center"><img src="images/footer.jpg" /></div>
</div>
Thanks so much and looking forward to a reply soon!!
:)