how do i make my layout for every screen resolution |
how do i make my layout for every screen resolution |
![]()
Post
#1
|
|
![]() Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 170 Joined: Aug 2008 Member No: 675,679 ![]() |
my resolution is 1440by 900 px
and idk if you need any screen shots or my code but the div goes tot the left if i switch my resolution how do i fix it???? my resolution is 1440by 900 px and idk if you need any screen shots or my code but the div goes tot the left if i switch my resolution how do i fix it???? i looked all over google.can't find a way.please can yall help |
|
|
![]() |
![]()
Post
#2
|
|
Senior Member ![]() ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 1,237 Joined: May 2008 Member No: 648,123 ![]() |
^ it's because you have your left margin set at -300 pixels, but the div is 400 pixels wide. if you're using left:50%; any margin-left:##px; you add in is going to move either left or right of the center of the page.
so, if you want the div positioned exactly in the center, the margin-left:##px; should be exactly half of the width of your div. |
|
|
![]()
Post
#3
|
|
![]() Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 170 Joined: Aug 2008 Member No: 675,679 ![]() |
^ it's because you have your left margin set at -300 pixels, but the div is 400 pixels wide. if you're using left:50%; any margin-left:##px; you add in is going to move either left or right of the center of the page. so, if you want the div positioned exactly in the center, the margin-left:##px; should be exactly half of the width of your div. then how do i position my div? if its set to 50%? |
|
|
![]() ![]() |