Hi, My background is in graphics, a bit of a newbie to web design, am learning code.
I'm aiming for an centred image as a header, size and proportions to remain fixed and centred. The centre image is asymmetrical, and I want the effect that the right and left edges of the header stretch off to the right and left edges of the screen without margins. The following code works in everything except Opera
The images Curves 7L.gif and Curves7R.gif are a 1 pixel crop off the edges of the centre image 'Curves7.gif' which I am trying to tile left & right, giving a stripey effect
<html>
<head>
<title>css header</title>
<style type='text/css'>
body
{ padding:0px;
margin:0px;}
div#back
{ position:absolute;
top:0px;
left:0px;}
div#back-left
{ width:49%;
height:85px;
background-image:url(Curves7L.gif);
border:none;
float:left;}
div#back-right
{ width:49%;
height:85px;
background-image:url(Curves7R.gif);
float:right;}
div#top
{ text-align:center;
position:absolute;
top:0px;
left:0px;
width:100%;}
img#top-image
{ width:901px;
height:85px;}
div.spacer
{ clear: both;
font-size:0px;
line-height:0px;}
</style>
</head>
<body>
<div id='back'>
<div class='spacer'> </div>
<div id='back-left'>
<div class='spacer'> </div>
</div>
<div id='back-right'>
<div class='spacer'> </div>
</div>
<div class='spacer'> </div>
</div>
<div id='top'>
<div class='spacer'> </div>
<img src='Curves7.gif' id='top-image'></img>
<div class='spacer'> </div>
</div>
</body>
</html>
I've also tried
background: #ffffff url(Curves7L.gif) repeat-x left;
instead of
background-image:url(Curves7L.gif);
border:none;
float:left;}
which also works in everything except Opera
One last thing, I'm down as an instructor, this is a mistake, I should be technical user, can this be changed?
Any help much appreciated
Cheers Mike
I'm aiming for an centred image as a header, size and proportions to remain fixed and centred. The centre image is asymmetrical, and I want the effect that the right and left edges of the header stretch off to the right and left edges of the screen without margins. The following code works in everything except Opera
The images Curves 7L.gif and Curves7R.gif are a 1 pixel crop off the edges of the centre image 'Curves7.gif' which I am trying to tile left & right, giving a stripey effect
<html>
<head>
<title>css header</title>
<style type='text/css'>
body
{ padding:0px;
margin:0px;}
div#back
{ position:absolute;
top:0px;
left:0px;}
div#back-left
{ width:49%;
height:85px;
background-image:url(Curves7L.gif);
border:none;
float:left;}
div#back-right
{ width:49%;
height:85px;
background-image:url(Curves7R.gif);
float:right;}
div#top
{ text-align:center;
position:absolute;
top:0px;
left:0px;
width:100%;}
img#top-image
{ width:901px;
height:85px;}
div.spacer
{ clear: both;
font-size:0px;
line-height:0px;}
</style>
</head>
<body>
<div id='back'>
<div class='spacer'> </div>
<div id='back-left'>
<div class='spacer'> </div>
</div>
<div id='back-right'>
<div class='spacer'> </div>
</div>
<div class='spacer'> </div>
</div>
<div id='top'>
<div class='spacer'> </div>
<img src='Curves7.gif' id='top-image'></img>
<div class='spacer'> </div>
</div>
</body>
</html>
I've also tried
background: #ffffff url(Curves7L.gif) repeat-x left;
instead of
background-image:url(Curves7L.gif);
border:none;
float:left;}
which also works in everything except Opera
One last thing, I'm down as an instructor, this is a mistake, I should be technical user, can this be changed?
Any help much appreciated
Cheers Mike