Log In · Register

 
can someone help me with a div overlay???
luvDBSK
post Jan 24 2009, 12:22 PM
Post #1


Newbie
*

Group: Member
Posts: 5
Joined: Mar 2008
Member No: 626,861



i just want to know if anyone knows how to center a div layout on myspace. right now its to the left and i want it centered. is that posible??
 
 
Start new topic
Replies
PeRRiiN
post Jan 24 2009, 04:42 PM
Post #2


Senior Member
***

Group: Member
Posts: 69
Joined: Jul 2008
Member No: 668,177



this is how you center a Div no matter whats the resolution of the viewer.
change the width and height to those of your Div, change the top to move it up or down, always leave left at 50% and set the margin-left value to half of the width (i.e. if the width of your Div is 400px set the margin-left to -200px).

CODE
div.name {
position: absolute;
width: XXpx;
height: XXpx;
top: xxpx;
left: 50%;
margin-left: xxpx;}
 

Posts in this topic


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