Log In · Register

 
Misaligned Page
YourSuperior
post Feb 17 2008, 12:25 AM
Post #1


;)
*******

Group: Staff Alumni
Posts: 9,573
Joined: Feb 2005
Member No: 99,124



Well I just finished coding my layout, and my friend is using a different resolution and they said the layout looks really misaligned on their computer and I use 1280x800 resolution. Can someone help me fix it? This is what it looks like on my computer:



Here's the site: http://takecamera.com/alvinward/test.php
 
 
Start new topic
Replies
libertie
post Feb 17 2008, 03:21 AM
Post #2


This bag is not a toy.
*******

Group: Staff Alumni
Posts: 3,090
Joined: Oct 2007
Member No: 583,108



QUOTE
#content {
/* Sets the position of the main div as well as the default fonts for the content */
position: relative;
width: 591px;
overflow: none;
font-family: "Times New Roman", Times, serif;
font-size: 12px;
color: #FFFFFF;
text-align: justify;
left: 50%;
margin-left: -390px;

top: -140px;
}


This code, in every resolution, will position the left side of the div exactly center of the page - then you need to move it to the left, so it will be exactly centered. What I usually do then is divide the total width of the content in half - it's about 780px - and give it a negative margin-left.

You would, of course, want to do the same for the sidebar only you wouldn't move it as far left (you may even have a positive margin).
 

Posts in this topic


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