Log In · Register

 
how do i make my layout for every screen resolution
Lj-Phresh
post Aug 26 2008, 03:36 AM
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????

QUOTE(YunginBoss3 @ Aug 26 2008, 03:36 AM) *
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
 
 
Start new topic
Replies (1 - 13)
schizo
post Aug 26 2008, 04:47 PM
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.
 
Lj-Phresh
post Aug 26 2008, 06:58 PM
Post #3


Senior Member
****

Group: Member
Posts: 170
Joined: Aug 2008
Member No: 675,679



QUOTE(schizo @ Aug 26 2008, 04:47 PM) *
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?
 
nikx618
post Aug 26 2008, 07:16 PM
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?
 
Lj-Phresh
post Aug 26 2008, 07:17 PM
Post #5


Senior Member
****

Group: Member
Posts: 170
Joined: Aug 2008
Member No: 675,679



QUOTE(nikx618 @ Aug 26 2008, 07:16 PM) *
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
 
fixtatik
post Aug 26 2008, 07:22 PM
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.
 
Lj-Phresh
post Aug 26 2008, 07:29 PM
Post #7


Senior Member
****

Group: Member
Posts: 170
Joined: Aug 2008
Member No: 675,679



QUOTE(fixtatik @ Aug 26 2008, 07:22 PM) *
^ 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%?
 
nikx618
post Aug 26 2008, 07:58 PM
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.
 
Lj-Phresh
post Aug 26 2008, 08:00 PM
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?
 
nikx618
post Aug 26 2008, 08:24 PM
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.
 
Lj-Phresh
post Aug 26 2008, 09:18 PM
Post #11


Senior Member
****

Group: Member
Posts: 170
Joined: Aug 2008
Member No: 675,679



QUOTE(nikx618 @ Aug 26 2008, 08:24 PM) *
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?
 
nikx618
post Aug 31 2008, 01:52 AM
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[:
 
xXcalebboylesXx
post Aug 31 2008, 08:26 AM
Post #13


myspace.com/calebboyleslayouts
***

Group: Member
Posts: 30
Joined: Mar 2008
Member No: 630,307



QUOTE(schizo @ Aug 26 2008, 02:47 PM) *
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!
 
Tomates
post Aug 31 2008, 11:29 AM
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
 

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