Centering and entire DIV Layout |
![]() ![]() |
Centering and entire DIV Layout |
![]()
Post
#1
|
|
![]() Love at first sight ![]() ![]() ![]() Group: Member Posts: 72 Joined: Jan 2006 Member No: 365,246 ![]() |
Ok, so I kinda need help centering my DIV layout. I've searched already and there's been nothing too helpful. My only concern with centering a div layout is will it mess up the pixels? For instance here is one of my DIVs:
CODE <div class="content" style="position: absolute; left: 63px; top:576px; width:220px; height:164px; overflow: auto; "> Won't the pixel's interfere with that? Maybe I'm asking a silly question but who knows. Help por favor? |
|
|
*WHIMSICAL 0NE* |
![]()
Post
#2
|
Guest ![]() |
If you want to center your layout it won't mess with the pixels, unless you resize that div. That's what the pixels are (obviously). To center it you just change the location (top,left) of the div.
CODE <div class="content" style="position: absolute;left:50%; top:0%;margin-left:XXXpx; margin-top:XXXpx; width:220px; height:164px; overflow: auto; "> Is the code to center the divs. You will have to mess around with the positioning because it starts from the middle, instead of the left like the paint programs.
|
|
|
![]() ![]() |