Positioning |
![]() ![]() |
Positioning |
![]()
Post
#1
|
|
![]() Senior Member ![]() ![]() ![]() Group: Member Posts: 40 Joined: Jan 2007 Member No: 497,172 ![]() |
Hereis my profile and how do i make it so the div stays center to the background image. It works fine with my current resolution, but when i resize it it goes off center.
|
|
|
*karmakiller* |
![]()
Post
#2
|
Guest ![]() |
For you div code, use something like this:
CODE <div class="bg" style="position: absolute; width:400px; height:100px; overflow:auto; Change width, height, margin-left, and margin-top accordingly.left:50%; top:0%; margin-left:-250px; margin-top:150px; overflow: hidden;"> CONTENT </div> Remember: QUOTE top: 0% = moves to top of page
top: 50% = moves to middle of page top: 100% = moves to bottem of page left: 0% = moves to left of page left: 50% = moves to center of page left: 100% = moves to right of page margin-left: -15px = moves left 15px margin-left: 15px = moves right 15px margin-top: 45px = moves down 45px margin-top: -45px = moves up 45px |
|
|
*SinfullySweet* |
![]()
Post
#3
|
Guest ![]() |
Make the left: property 50%, and basically position it by adding (example) -45 to make the layer go farther to the left, and add (example) 45 to make the layer go farther to the right.
|
|
|
![]() ![]() |