Help - Search - Members - Calendar
Full Version: Alignment problem
Forums > Resource Center > Support Center > MySpace Support > Myspace Resolved Topics
ChiRel
I just finished my myspace layout and when I view it on my computer its set up prefectly, however when I view it on my sister's computer everything is off center. Anyone know why that is or is it because of the different resolutions?

This is how it looks on my laptop and the way its supposed to look
click to enlarge


This is how it looks on my sister's computer
click to enlarge
ChiRel
K, I just tried that and it still looks the same on my sister's comp but it changed how it looked on mine x.x. Could you tell me if it looks weird on your screen please. My myspace page
ChiRel
alright, thank you anyway ^_^
fixtatik
you're getting that problem because you've only positioned each div to work on a 1280x800 resolution screen.

your divs look like this:
CODE
<div class="content" style="position: absolute;
left: 740px; top:835px; width:250px; height:80px; overflow: auto; ">

that means that specific div will always be 740 pixels from the left side of the browser, no matter the size of the screen. (try changing the size of your browser, and you'll see what i mean.)

to fix it, you need to change the left:; property to left:50%; and you'll have to position the div with margins. left:50%; moves the left side of the div halfway across your browser. from there, you can adjust the position from the center using margin-left:;

so for example, using the div up there, if you wanted it in the exact center of your screen, it would look like this:
CODE
<div class="content" style="position: absolute;
left: 50%; top:835px; margin-left:-125px; width:250px; height:80px; overflow: auto; ">

i used margin-left:-125px; because the width of that div is 250 pixels. using negative numbers moves it to the left, while positive numbers move it to the right.

you'll have to adjust all of your divs doing that.
Mickey
^Yep. Also, since the left attribute is 50%, the margin-left attribute is usually 50% of the width. Like on Fixtatik's example, the width is 250 so the margin-left attribute is -125. If you want to move it further to the left, just make the number higher but leave the minus symbol. If you want to move it to the right, make that number lower but leave the minus symbol. If you want to move it even further to the right, remove the minus symbol and make the number higher.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.