I need some help with coding, Coding website templates |
I need some help with coding, Coding website templates |
![]()
Post
#1
|
|
![]() "One hell of a butler" ![]() ![]() ![]() Group: Member Posts: 95 Joined: Nov 2008 Member No: 696,422 ![]() |
I'm having a hard time coding my layouts so that it can be aligned correctly with all computer screen widths.
For example, I code/design my layouts on a laptop and the screen is really wide. Then I go view the layout on another computer with a thinner screen width and everything is misaligned and just horrible. What can I do to fix that? |
|
|
![]() |
![]()
Post
#2
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 ![]() |
There's always that little absolute positioning hack.
CODE div#id { width:###px; position:absolute; top:###px; left:50%; margin-left:-###px; /* This is half the amount of pixels that you input into the width property */ } It's kind of pointless though, using the margin:auto; method that FACreate mentioned is a bunch better and it saves time and server space. |
|
|
![]()
Post
#3
|
|
![]() ~* Traditional Witch ![]() ![]() ![]() Group: Member Posts: 73 Joined: Jul 2007 Member No: 553,061 ![]() |
There's always that little absolute positioning hack. CODE div#id { width:###px; position:absolute; top:###px; left:50%; margin-left:-###px; /* This is half the amount of pixels that you input into the width property */ } It's kind of pointless though, using the margin:auto; method that FACreate mentioned is a bunch better and it saves time and server space. Yeah, using left:50% is your best bet. |
|
|
![]() ![]() |