iknowyou
09-16-2011, 09:52 AM
Hey guys I just started learning CSS today, I am just wondering how to solve this problem:
The below image is what I want the site to appear as even if I decrease my browser size:
http://i52.tinypic.com/2ih5j86.jpg
But what happens is if i minimize my browser it becomes like this
http://i52.tinypic.com/kd4vwz.jpg
My Html code is:
</head>
<body>
<div class='header'>
<img src="header2.jpg" width="100%">
</div>
<div class='navbar'>
<div class='button'> <a href='#'>Home</a> </div>
<div class='button'> <a href='#'>About</a> </div>
<div class='button'> <a href='#'>Contact</a> </div>
<div class='button'> <a href='#'>Profile</a> </div>
<div class='button'> <a href='#'>Careers</a> </div>
<div class='button'> <a href='#'>Admission</a> </div>
<div class='button'> <a href='#'>FAQ</a> </div>
</div>
</body>
My css code is:
.header{
z-index: -1;
position:absolute;top:0;left:0;width:100%;height:100%;
}
.navbar{
width: 100%;
height: 25px;
font-family: verdana;
font-size: 13px;
line-height: 22px;
font-weight: bold;
border: 1px solid #000;
background: url(navbar.jpg) repeat-x;
position: absolute;
top: 256px;
left: 0
}
.button a{
float: left;
width: 100px;
height: 25px;
color: #000;
text-decoration: none;
text-align: center;
}
.button a:hover{
float: left;
width: 100px;
height: 25px;
color: #fff;
text-decoration: none;
text-align: center;
background: url(navbar_roll.jpg) repeat-x;
}
Any help would be much appreciated, cheers!
The below image is what I want the site to appear as even if I decrease my browser size:
http://i52.tinypic.com/2ih5j86.jpg
But what happens is if i minimize my browser it becomes like this
http://i52.tinypic.com/kd4vwz.jpg
My Html code is:
</head>
<body>
<div class='header'>
<img src="header2.jpg" width="100%">
</div>
<div class='navbar'>
<div class='button'> <a href='#'>Home</a> </div>
<div class='button'> <a href='#'>About</a> </div>
<div class='button'> <a href='#'>Contact</a> </div>
<div class='button'> <a href='#'>Profile</a> </div>
<div class='button'> <a href='#'>Careers</a> </div>
<div class='button'> <a href='#'>Admission</a> </div>
<div class='button'> <a href='#'>FAQ</a> </div>
</div>
</body>
My css code is:
.header{
z-index: -1;
position:absolute;top:0;left:0;width:100%;height:100%;
}
.navbar{
width: 100%;
height: 25px;
font-family: verdana;
font-size: 13px;
line-height: 22px;
font-weight: bold;
border: 1px solid #000;
background: url(navbar.jpg) repeat-x;
position: absolute;
top: 256px;
left: 0
}
.button a{
float: left;
width: 100px;
height: 25px;
color: #000;
text-decoration: none;
text-align: center;
}
.button a:hover{
float: left;
width: 100px;
height: 25px;
color: #fff;
text-decoration: none;
text-align: center;
background: url(navbar_roll.jpg) repeat-x;
}
Any help would be much appreciated, cheers!