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: Staff Alumni Posts: 2,435 Joined: Feb 2007 Member No: 506,205 ![]() |
Don't. Double. Post. That has to be the tenth time I've asked you. Someone will get to your topic. BE PATIENT.
You need to use left:50% and margin-left:#px to position all your layers. That way it will stay in the same place. |
|
|
![]()
Post
#3
|
|
![]() Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 170 Joined: Aug 2008 Member No: 675,679 ![]() |
Don't. Double. Post. That has to be the tenth time I've asked you. Someone will get to your topic. BE PATIENT. You need to use left:50% and margin-left:#px to position all your layers. That way it will stay in the same place. thats how i do it but its still diffrent? |
|
|
![]()
Post
#4
|
|
![]() asdfghjkl; ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 1,121 Joined: Jul 2008 Member No: 665,416 ![]() |
If that's how you do it, it shouldn't be. If you do it correctly. Why don't you post up your codes?
|
|
|
![]()
Post
#5
|
|
![]() Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 170 Joined: Aug 2008 Member No: 675,679 ![]() |
If that's how you do it, it shouldn't be. If you do it correctly. Why don't you post up your codes? ok well heres part of my code CODE .37182{background settings}
body{ background-color: 000; background-image: url('IMAGE_URL_HERE'); background-repeat: no-repeat; background-attachment: scroll; background-position: center 150px; } .37182{the first div} .divOne{position: absolute; left: 50%; overflow: auto; top: 160px; margin-left: -300px; width: 400px; height: 400px; background-color: fff; z-index: 1; padding: 3px; border: 2px solid; border-color: 00aaff; }
Reason for edit: please put codes in codeboxes. thanks :) -natalia
|
|
|
![]()
Post
#6
|
|
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
#7
|
|
![]() 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%? |
|
|
![]()
Post
#8
|
|
![]() asdfghjkl; ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 1,121 Joined: Jul 2008 Member No: 665,416 ![]() |
i think it would be margin-left:-200px; on account that your div is 400px wide.
negative would make it go left, and positive integers would make it go right. |
|
|
![]()
Post
#9
|
|
![]() Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 170 Joined: Aug 2008 Member No: 675,679 ![]() |
OH.im dumb.but they are just random numbers for width height
i mean for any div i make.how do i fix it? |
|
|
![]()
Post
#10
|
|
![]() asdfghjkl; ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 1,121 Joined: Jul 2008 Member No: 665,416 ![]() |
well, you should figure out the actual pixels of the div image. like use the rectangular select thing and select the whole box, and go file, new, and it shows the height and width of the image. at least that's how i do it. i know there are other ways, but that's how i do it. &yeah, just find the actual size of the div &your good.
|
|
|
![]()
Post
#11
|
|
![]() Senior Member ![]() ![]() ![]() ![]() Group: Member Posts: 170 Joined: Aug 2008 Member No: 675,679 ![]() |
well, you should figure out the actual pixels of the div image. like use the rectangular select thing and select the whole box, and go file, new, and it shows the height and width of the image. at least that's how i do it. i know there are other ways, but that's how i do it. &yeah, just find the actual size of the div &your good. you mean like use the rec,box shape it then crop it and find the width? ok? adn afta that? |
|
|
![]()
Post
#12
|
|
![]() asdfghjkl; ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 1,121 Joined: Jul 2008 Member No: 665,416 ![]() |
yeah, like rec box(the selection thing right?) the whole image then CTRL+C then go FILE>NEW then the width and height that it shows is the width and height of what you just selected.
then adjust your div width and height, then change the margin-left[: |
|
|
![]()
Post
#13
|
|
![]() myspace.com/calebboyleslayouts ![]() ![]() ![]() Group: Member Posts: 30 Joined: Mar 2008 Member No: 630,307 ![]() |
Don't. Double. Post. That has to be the tenth time I've asked you. Someone will get to your topic. BE PATIENT. You need to use left:50% and margin-left:#px to position all your layers. That way it will stay in the same place. schizo is exactly correct. do this, and it will work! |
|
|
![]()
Post
#14
|
|
![]() poison ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 4,806 Joined: Mar 2008 Member No: 629,020 ![]() |
dont change the number that has the % after it
change the number in margin-left:50px also it can use negative numbers too |
|
|
![]() ![]() |