Hey. Ive searched the archives and checked the FAQs, I cant find one that helps. But maybe Im just unable to spot a good answer...
I would like to center a div object so it'll always be in the middle when the page resizes. If I was guaranteed that every user had 1024 x 768 resolution, it wouldn't be a problem but obviously nothing's easy.
I currently use the code below, though... it doesnt work at all. Everything just shifts to the left as if the center tag doesn't exist.
<center>
<div class="everything">
<div class="banner">
<div class="topleft"><img src="topleft.png" width="155" height="47"><div>
<div class="middle"></div>
<div class="topright"><img src="topright.png" width="320" height="37"></div>
<div class="navigation"><img src="navigation.png" width="760" height="29"></div>
<div class="corporate"><img src="corporate.png" width="760" height="22"></div>
<input class="search">
<select class="searcharea">
</div>
</div>
</center>
I'm using IE 6.1, notepad and a stylesheet:
div.everything {
height: 822;
width: 760;
}
That did have a position: absolute and x,y coordinates but I removed them because I don't want it to be resolution specific.
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
I would like to center a div object so it'll always be in the middle when the page resizes. If I was guaranteed that every user had 1024 x 768 resolution, it wouldn't be a problem but obviously nothing's easy.
I currently use the code below, though... it doesnt work at all. Everything just shifts to the left as if the center tag doesn't exist.
<center>
<div class="everything">
<div class="banner">
<div class="topleft"><img src="topleft.png" width="155" height="47"><div>
<div class="middle"></div>
<div class="topright"><img src="topright.png" width="320" height="37"></div>
<div class="navigation"><img src="navigation.png" width="760" height="29"></div>
<div class="corporate"><img src="corporate.png" width="760" height="22"></div>
<input class="search">
<select class="searcharea">
</div>
</div>
</center>
I'm using IE 6.1, notepad and a stylesheet:
div.everything {
height: 822;
width: 760;
}
That did have a position: absolute and x,y coordinates but I removed them because I don't want it to be resolution specific.
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."