Forum Moderators: not2easy
See the screen shots:
IE
<snip>
Firefox
<snip>
I think the problem is my html, but I'm not sure.
Thanx a lot!
--
No URL's please, see TOS [webmasterworld.com]
[edited by: limbo at 6:16 pm (utc) on Jan. 6, 2010]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"><title>example.com</title>
<link href="css/index.css" rel="stylesheet" type="text/css" >
<link href="css/dropdown/dropdown.css" media="all" rel="stylesheet" type="text/css" >
<link href="css/dropdown/themes/default/default.css" media="all" rel="stylesheet" type="text/css" >
I did the validation before and there are a few errors but I think thats not the problem.
Thank you very much for your quick answer!
[edited by: limbo at 6:17 pm (utc) on Jan. 6, 2010]
Thats the css:
#header {
background: url(images/Unbenannt.jpg) repeat-x left top;
margin: 0px auto;
width: 800px;
height: 190px;
padding: 0px 0px 0px 10px;
/**-moz-border-radius-topleft:15px;
-moz-border-radius-topright:15px;*/
}
#headerpic {
background: url(images/header_grafik.png)no-repeat top;
position:relative; left:25px; top:13px;
width: 744px;
height: 187px;
}
And here the part of the html:
<body style="text-align:center;">
<div id="body">
<div id="header">
<div id="headerpic">
</div>
</div>
Is that a position problem?
Thanx
<link href="css/index.css" rel="stylesheet" type="text/css" >
<link href="css/dropdown/dropdown.css" media="all" rel="stylesheet" type="text/css" >
<link href="css/dropdown/themes/default/default.css" media="all" rel="stylesheet" type="text/css" >
then this.
background: url(images/Unbenannt.jpg) repeat-x left top;
background: url(images/header_grafik.png)no-repeat top;
CSS loads images relative to the css file, not the document. So depending on which style sheet this is, it is expecting an images directory in /css, /css/dropdown, or css/dropdown/themes/default.
These are all fixed by putting a leading slash for all references, this means "start at the domain root."
<link href="/css/index.css" rel="stylesheet" type="text/css" >
<link href="/css/dropdown/dropdown.css" media="all" rel="stylesheet" type="text/css" >
<link href="/css/dropdown/themes/default/default.css" media="all" rel="stylesheet" type="text/css" >
....
background: url(/images/Unbenannt.jpg) repeat-x left top;
background: url(/images/header_grafik.png)no-repeat top;
Now, no matter where your documents are or your css/images are, it will always find them.
The down side is this won't work on your local computer, you have to do what I call "toothpic syndrome:"
background: url(../../images/Unbenannt.jpg) repeat-x left top;
It was probably working in one instance or another because the images or style sheet were cached.
I did the validation before and there are a few errors but I think thats not the problem.