Centering DIV in different resolutions |
Centering DIV in different resolutions |
![]()
Post
#1
|
|
![]() Always Move Fast ![]() ![]() ![]() ![]() Group: Member Posts: 167 Joined: Aug 2005 Member No: 192,635 ![]() |
I've tried using this code to center my DIV layout in different resolutions :
CODE <div class="content" style="position:absolute; z-index:2; left:50%; top:0%; margin-left:-195px; margin-top:150px; width:210px; height:210px;border-style:solid; border-width:0px; border-color:000000;overflow:auto;"> but it doesn't seem to work for me. do i need to delete the image code of my layout for it to work? |
|
|
![]() |
![]()
Post
#2
|
|
![]() Always Move Fast ![]() ![]() ![]() ![]() Group: Member Posts: 167 Joined: Aug 2005 Member No: 192,635 ![]() |
it seems that it still not centering though im using this code:
CODE <div class="image" style="position: absolute; left:centerpx; top:180px; background-color:;"><img src="http://i10.tinypic.com/2ljowvs.jpg"></div> here's my test site for my layout click! |
|
|
![]()
Post
#3
|
|
![]() Lurker. ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 2,161 Joined: Feb 2004 Member No: 3,851 ![]() |
it seems that it still not centering though im using this code: CODE <div class="image" style="position: absolute; left:centerpx; top:180px; background-color:;"><img src="http://i10.tinypic.com/2ljowvs.jpg"></div> here's my test site for my layout click! You should take out the "px" in "centerpx." =] |
|
|
![]() ![]() |