Log In · Register

 
Positioning
Rudolphski
post Jul 9 2007, 09:04 PM
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.
 
 
Start new topic
Replies
*karmakiller*
post Jul 9 2007, 10:31 PM
Post #2





Guest






For you div code, use something like this:
CODE
<div class="bg" style="position: absolute; width:400px; height:100px; overflow:auto;
left:50%; top:0%;
margin-left:-250px; margin-top:150px; overflow: hidden;">
CONTENT
</div>
Change width, height, margin-left, and margin-top accordingly.

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
 

Posts in this topic
Rudolphski   Positioning   Jul 9 2007, 09:04 PM
karmakiller   For you div code, use something like this: CODE...   Jul 9 2007, 10:31 PM
SinfullySweet   Make the left: property 50%, and basically posi...   Jul 10 2007, 12:14 AM


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: