browser div problems, in safari my profile is fine but everything else is off |
browser div problems, in safari my profile is fine but everything else is off |
Jun 29 2008, 02:17 PM
Post
#1
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 50 Joined: Aug 2007 Member No: 555,108 |
in firefox 3 of the areas shift down for some reason
TEST PAGE...ok i fixed this (i think, tell me) real page, way off, no clue y must b under 18 to see real due to my mom being nosy. lol BTW both pages have the same coding if u want to see the coding and can fix that plz let me know |
|
|
|
![]() |
Jun 29 2008, 10:19 PM
Post
#2
|
|
|
Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 1,237 Joined: May 2008 Member No: 648,123 |
CODE <style type="text/css"> .divname { position:absolute; top:0; left:50%; margin:150px 0 0 -400px; width:800px; } </style> this is kind of a condensed example. basically, what the whole thing means is that the div called "divname" is to be moved to the right 50% of the user's browser window width (from the left, hence "left:50%;"). the first number of the margin means you want the top of the div to be 150 pixels from the top of the page. the fourth number of the margin means you want the left side of the div -400 pixels from the exact center of the page (moving the left side in the left direction). the format of it is like this: margin:TOP RIGHT BOTTOM LEFT; it's the same idea as doing margin-top:##px; margin-right:##px;, etc., but in a shorter version. the number of pixels you're moving to the left depends on how wide the div is that you're moving. in this example, if you want that 800-pixel-wide div to be in the exact center of the page, you'd move it to the left 400 pixels (-400px). in another situation, if you have a smaller div, say 230 pixels, and you wanted it 20 pixels to the right of the exact center, you'd simply put "20px" where the left margin number goes. it's kind of confusing when you're first starting out, but it really just takes practice, like everything else. learn by trial and error: sometimes it's the best way. |
|
|
|
lbroskee browser div problems Jun 29 2008, 02:17 PM
fixtatik i don't understand what you mean by "shif... Jun 29 2008, 02:31 PM
lbroskee ok so now i have it so i get the same results in a... Jun 29 2008, 02:39 PM
fixtatik i put the coding in my profile, and i'm still ... Jun 29 2008, 03:16 PM
lbroskee ya i no it to the left lik that causes the link pr... Jun 29 2008, 04:08 PM
allvanishing Try this, it'll center to different screen siz... Jun 29 2008, 09:50 PM
lbroskee omg. thank you so much!! can u tell me wha... Jun 29 2008, 09:53 PM
allvanishing CODE<div style="width: 1024px; height... Jun 30 2008, 09:17 PM
lbroskee o ok. i get it. thnx Jun 30 2008, 10:42 PM
manny-the-dino Topic Closed Jun 30 2008, 11:58 PM![]() ![]() |