nick2price
05-20-2012, 10:44 PM
Hi, I wanted to try a liquid layout, although I dont think I am doing things very well. I need to produce a header the same as the following
http://i46.tinypic.com/2lkyauf.jpg
At this moment, I do
<!-- HEADER -->
<div id="header">
<div class="wrapper"> <a href="index.html"><img id="logo" src="images/logo.png" alt="" /></a> </div>
<div class="wrapper"> <img id="logoTwo" src="images/top.png" alt="" /> </div>
<div class="wrapper"><div id="text">TRUSTED BY THE WORLD'S <br> MOST DEMANDING CLIENTS</div></div>
</div>
<!-- ENDS HEADER -->
Where the header id has the background image for the header, and log and logoTwo are the two logos you see in the image (including the you call us section as a logo).
The css is as follows
#header{
height: 100px;
position: relative;
z-index: 10;
background: #2a2d30 url(../images/header.png) top center no-repeat;
background-size:100% 100%;
}
#logo{
position: absolute;
top: 5px;
left: 30px;
}
#logoTwo{
position: absolute;
top: 5px;
left: 620px;
}
#text{
font:Tahoma, Geneva, sans-serif;
color:#FFFFFF;
font-size:18px;
position: absolute;
top:25px;
left:330px;
}
Now, everything seems to be positioned nicely on my computer. I am worried if it will be the same on different resolutions are. When I originally used padding instead, the logo's seemed to move places on different resolutions. The top, left attributes dont appear to make this happen. Whats the difference between to two? Also, is my code ok? Would you do things differently?
Just any advise you can give would be greatly appeciated.
Cheers
Nick
http://i46.tinypic.com/2lkyauf.jpg
At this moment, I do
<!-- HEADER -->
<div id="header">
<div class="wrapper"> <a href="index.html"><img id="logo" src="images/logo.png" alt="" /></a> </div>
<div class="wrapper"> <img id="logoTwo" src="images/top.png" alt="" /> </div>
<div class="wrapper"><div id="text">TRUSTED BY THE WORLD'S <br> MOST DEMANDING CLIENTS</div></div>
</div>
<!-- ENDS HEADER -->
Where the header id has the background image for the header, and log and logoTwo are the two logos you see in the image (including the you call us section as a logo).
The css is as follows
#header{
height: 100px;
position: relative;
z-index: 10;
background: #2a2d30 url(../images/header.png) top center no-repeat;
background-size:100% 100%;
}
#logo{
position: absolute;
top: 5px;
left: 30px;
}
#logoTwo{
position: absolute;
top: 5px;
left: 620px;
}
#text{
font:Tahoma, Geneva, sans-serif;
color:#FFFFFF;
font-size:18px;
position: absolute;
top:25px;
left:330px;
}
Now, everything seems to be positioned nicely on my computer. I am worried if it will be the same on different resolutions are. When I originally used padding instead, the logo's seemed to move places on different resolutions. The top, left attributes dont appear to make this happen. Whats the difference between to two? Also, is my code ok? Would you do things differently?
Just any advise you can give would be greatly appeciated.
Cheers
Nick