MoonQuake
05-04-2010, 01:52 AM
What I want to do seems simple:
A main DIV that includes my whole page.
Page consists of a background image (inside the main DIV) and multiple DIVs that I use to align interactive buttons over the image, all inside the main DIV.
I want the whole page always centered, and independently of the window size, for the buttons (each in their respective DIVs) to always stay perfectly aligned on the background image.
Even after searching the web for the answer, I can't seem to make it work. I don't know which alignment/position property to use!
Here's my DIV code (untouched from what Dreamwaver generated):
<div id="content">
<div align="relative">
<p align="center"><img src="index.jpg" width="999" height="801" align="absmiddle"></p>
<div id="Layer2" style="position: absolute; width: 134px; height: 86px; z-index: 3; left: 821px; top: 31px;"><a href="multimedia.htm" target="_self" onMouseOver="MM_swapImage('Image3','','multimedia_h.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="multimedia.jpg" name="Image3" width="126" height="48" border="0" align="absmiddle"></a></div>
<div id="Layer3" style="position: absolute; width: 135px; height: 98px; z-index: 4; left: 948px; top: 31px;"><a href="videogames.htm" target="_blank" onMouseOver="MM_swapImage('Image4','','videogames_h.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="videogames.jpg" name="Image4" width="130" height="48" border="0" align="absmiddle"></a></div>
<div id="Layer4" style="position: absolute; width: 125px; height: 97px; z-index: 5; left: 1079px; top: 31px;"><a href="about.htm" target="_self" onMouseOver="MM_swapImage('Image5','','about_h.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="about.jpg" name="Image5" width="121" height="48" border="0" align="absmiddle"></a></div>
<div id="Layer5" style="position: absolute; width: 134px; height: 97px; z-index: 6; left: 1201px; top: 31px;"><a href="cv.htm" target="_self" onMouseOver="MM_swapImage('Image6','','cv_h.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="cv.jpg" name="Image6" width="121" height="48" border="0" align="absmiddle"></a></div>
</div>
</div>
Thanks in advance!
A main DIV that includes my whole page.
Page consists of a background image (inside the main DIV) and multiple DIVs that I use to align interactive buttons over the image, all inside the main DIV.
I want the whole page always centered, and independently of the window size, for the buttons (each in their respective DIVs) to always stay perfectly aligned on the background image.
Even after searching the web for the answer, I can't seem to make it work. I don't know which alignment/position property to use!
Here's my DIV code (untouched from what Dreamwaver generated):
<div id="content">
<div align="relative">
<p align="center"><img src="index.jpg" width="999" height="801" align="absmiddle"></p>
<div id="Layer2" style="position: absolute; width: 134px; height: 86px; z-index: 3; left: 821px; top: 31px;"><a href="multimedia.htm" target="_self" onMouseOver="MM_swapImage('Image3','','multimedia_h.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="multimedia.jpg" name="Image3" width="126" height="48" border="0" align="absmiddle"></a></div>
<div id="Layer3" style="position: absolute; width: 135px; height: 98px; z-index: 4; left: 948px; top: 31px;"><a href="videogames.htm" target="_blank" onMouseOver="MM_swapImage('Image4','','videogames_h.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="videogames.jpg" name="Image4" width="130" height="48" border="0" align="absmiddle"></a></div>
<div id="Layer4" style="position: absolute; width: 125px; height: 97px; z-index: 5; left: 1079px; top: 31px;"><a href="about.htm" target="_self" onMouseOver="MM_swapImage('Image5','','about_h.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="about.jpg" name="Image5" width="121" height="48" border="0" align="absmiddle"></a></div>
<div id="Layer5" style="position: absolute; width: 134px; height: 97px; z-index: 6; left: 1201px; top: 31px;"><a href="cv.htm" target="_self" onMouseOver="MM_swapImage('Image6','','cv_h.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="cv.jpg" name="Image6" width="121" height="48" border="0" align="absmiddle"></a></div>
</div>
</div>
Thanks in advance!