Misaligned Page |
![]() ![]() |
Misaligned Page |
![]()
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 |
|
|
![]()
Post
#2
|
|
![]() Senior Member ![]() ![]() ![]() Group: Member Posts: 35 Joined: Dec 2007 Member No: 602,080 ![]() |
I suppose you change your "#content" code to absolute positioning, and use margin-left, instead of just left.
|
|
|
![]()
Post
#3
|
|
![]() 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). |
|
|
![]()
Post
#4
|
|
![]() ;) ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 9,573 Joined: Feb 2005 Member No: 99,124 ![]() |
Hmm, but that makes it misaligned for me. :-\
|
|
|
![]()
Post
#5
|
|
![]() ;) ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 9,573 Joined: Feb 2005 Member No: 99,124 ![]() |
Forgive me for double posting, but would it be better if I code it with Dreamweaver?
|
|
|
![]()
Post
#6
|
|
![]() This bag is not a toy. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 3,090 Joined: Oct 2007 Member No: 583,108 ![]() |
I prefer to use a text editor, personally. I like having full control over my code, knowing what everything is, etc, and I don't like the extra stuff DW puts in. But if you just used the code as I posted it, it probably won't work - basically, you'll want to play around with the numbers a little bit, particularly the margin-left property.
|
|
|
![]()
Post
#7
|
|
![]() ;) ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 9,573 Joined: Feb 2005 Member No: 99,124 ![]() |
But can Dreamweaver do multi-resolution compatibility?
|
|
|
![]()
Post
#8
|
|
![]() This bag is not a toy. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 3,090 Joined: Oct 2007 Member No: 583,108 ![]() |
I'm sure it can, but I'm not really the right person to tell you whether or not it'd be easier, because I just don't like using it. I still think it would be easier, since you've already made the layout, to fix the code to make it fluid rather than trying to do it in a different program.
Maybe someone who does use Dreamwaver can give you some pointers? |
|
|
![]()
Post
#9
|
|
![]() ;) ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 9,573 Joined: Feb 2005 Member No: 99,124 ![]() |
What's a perfect way to design a page where it's aligned in most resolutions/browsers?
|
|
|
![]()
Post
#10
|
|
![]() This bag is not a toy. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 3,090 Joined: Oct 2007 Member No: 583,108 ![]() |
Have you tried something like this? Try using it in place of your content/sidebar:
CODE #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: -386px; top: -140px; } #navigation { /* Sets the position for the sidebar as well as the default module fonts */ position: absolute; width: 164px; overflow: hidden; font-family: "Times New Roman", Times, serif; font-size: 12px; color: #FFFFFF; text-align: justify; top: -1px!important; top: -420px; left: 50%; margin-left: 218px; } |
|
|
![]() ![]() |