nick2price
05-28-2012, 04:36 AM
I have a problem with my header. The header has a background image, and two logos which should overflow. I am attempting to use the 1140 grid system. So the html is
<div class="container">
<div class="row">
<div class="twelvecol last" id="imgHolder">
<img id="logo" src="images/logo.jpg" />
<img id="top" src="images/top.png" />
</div>
</div>
</div>
And the css is
.container {
padding-left: 20px;
padding-right: 20px;
}
.row {
width: 100%;
max-width: 1140px;
min-width: 755px;
margin: 0 auto;
}
.row .twelvecol {
width: 100%;
float: left;
}
#topImg {
width: 100%;
}
#footerImg {
width: 100%;
}
#imgHolder{
background:#efefef url(../images/header.jpg) no-repeat;
background-size:100% 100%;
}
#logo{
float:left;
}
#top{
float:right;
}
classes container and row are from the grid template. I have a couple of problems. Firstly, the two logos dont overflow. I have tried setting the overflow property without no success. My second issue relates to the positioning of the logos. float left and right partly do the job, but now I need to get them in more precise positions. I cant use absolute, as this will mess things up when the browser is resized. So what is the best thing to do to precisely position my images whilst allowing for the adaptive layout?
cheers
Nick
<div class="container">
<div class="row">
<div class="twelvecol last" id="imgHolder">
<img id="logo" src="images/logo.jpg" />
<img id="top" src="images/top.png" />
</div>
</div>
</div>
And the css is
.container {
padding-left: 20px;
padding-right: 20px;
}
.row {
width: 100%;
max-width: 1140px;
min-width: 755px;
margin: 0 auto;
}
.row .twelvecol {
width: 100%;
float: left;
}
#topImg {
width: 100%;
}
#footerImg {
width: 100%;
}
#imgHolder{
background:#efefef url(../images/header.jpg) no-repeat;
background-size:100% 100%;
}
#logo{
float:left;
}
#top{
float:right;
}
classes container and row are from the grid template. I have a couple of problems. Firstly, the two logos dont overflow. I have tried setting the overflow property without no success. My second issue relates to the positioning of the logos. float left and right partly do the job, but now I need to get them in more precise positions. I cant use absolute, as this will mess things up when the browser is resized. So what is the best thing to do to precisely position my images whilst allowing for the adaptive layout?
cheers
Nick