 |
HTML Help Please Search for the answer to your question before asking it! Thanks.
|
| View previous topic :: View next topic |
| Author |
Message |
JacobAlexander_
Joined: 09 Apr 2009
Posts: 1
|
| Posted: Thu Apr 09, 2009 9:14 am Div Layer not centered |
|
|
Im 100% new to hetml and div layering and all that
this is my first div layer typ myspace
its centered on my laptop(18in toshiba using firefox) but not on any other computer ive looked at it on
how do i keep it centered to the nav bar on myspace?
Ive read up a little but and io think it has something to do with having the position at absolute but im not sure
Thank you in advance
<div id="abovenav" style="position: absolute; center; width:800px; height:270px; z-index:7; left: 304px; top: 10px;"><img src="http://i725.photobucket.com/albums/ww256/JacobAlexander_/abovenav.png" width="800" height="476" border="0" /></a></div> </div>
<div id="nav" style="position: absolute; left; width:800px; height:265px; z-index:7; left: 304px; top: 140px;"><img src="http://i44.tinypic.com/2ymzibm.png" width="800" height="27" border="0" /></a></div> </div>
<div id="TOP" style="position: absolute; left; width:800px; height:152px; z-index:7; left: 304px; top: 174px;"><img src="http://i44.tinypic.com/2i9jko3.jpg" width="800" height="152" border="0" /></a></div> </div>
<div id="MESSAGE" style="position: absolute; left; width:215px; height:26px; z-index:7; left: 304px; top: 325px;"><a href="http://www.msplinks.com/MDFodHRwOi8vbWVzc2FnaW5nLm15c3BhY2UuY29tL2luZGV4LmNmbT9mdXNlYWN0aW9uPW1haWwubWVzc2FnZVYyJmZyaWVuZElEPTIzNzQ5OTA0Nw=="><img src="http://i725.photobucket.com/albums/ww256/JacobAlexander_/LAYOUT_02.png" width="215" height="26" border="0" /></a></div> </div>
<div id="COMMENT" style="position: absolute; left; width:148px; height:26px; z-index:7; left: 519px; top: 325px;"><a href="http://www.msplinks.com/MDFodHRwOi8vY29tbWVudC5teXNwYWNlLmNvbS9pbmRleC5jZm0/ZnVzZWFjdGlvbj11c2VyLnZpZXdQcm9maWxlX2NvbW1lbnRGb3JtJmZyaWVuZElEPTIzNzQ5OTA0Nw=="><img src="http://i725.photobucket.com/albums/ww256/JacobAlexander_/LAYOUT_03.png" width="148" height="26" border="0" /></a></div> </div>
<div id="ADD" style="position: absolute; left; width:116px; height:26px; z-index:7; left: 667px; top: 325px;"><a href="http://www.msplinks.com/MDFodHRwOi8vZnJpZW5kcy5teXNwYWNlLmNvbS9pbmRleC5jZm0/ZnVzZWFjdGlvbj1pbnZpdGUuYWRkZnJpZW5kX3ZlcmlmeSZmcmllbmRJRD0yMzc0OTkwNDc="><img src="http://i725.photobucket.com/albums/ww256/JacobAlexander_/LAYOUT_04.png" width="116" height="26" border="0" /></a></div> </div>
<div id="FORSALE" style="position: absolute; left; width:321px; height:26px; z-index:7; left: 783px; top: 325px;"><a href="http://viewmorepics.myspace.com/index.cfm?fuseaction=user.viewPicture&friendID=237499047&albumId=1135514"><img src="http://i725.photobucket.com/albums/ww256/JacobAlexander_/LAYOUT_05.png" width="321" height="26" border="0" /></a></div> </div>
<div id="TOPIMAGE" style="position: absolute; left; width:800px; height:307px; z-index:7; left: 304px; top: 351px;"><img src="http://i725.photobucket.com/albums/ww256/JacobAlexander_/LAYOUT_06-2.png" width="800" height="307" border="0" /></a></div> </div>
<div id="BOTTOM" style="position: absolute; left; width:800px; height:277px; z-index:7; left: 304px; top: 658px;"><img src="http://i725.photobucket.com/albums/ww256/JacobAlexander_/LAYOUT_07.png" width="800" height="277" border="0" /></a></div> </div> |
|
|
PayneLess Designs
Joined: 28 Feb 2007
Posts: 3593
Location: Biloxi, MS
|
| Posted: Thu Apr 09, 2009 1:39 pm |
|
|
Try getting rid of the absolute positioning. To get a div centered, it must have a reasonable width and set margin with:
margin: 0 auto; |
|
|
| |
|
|
|
Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group
|