Jump to content

Recommended Posts

Posted

Hi all,

 

I'm setting up an artist page on myspace and am having a hard time trying to keep my top image fixed with different screen resolutions. I'm working in the standard 1024x768 and when I change resolution my top banner image shifts to the left of the screen and does not resize to fit screen resolution.

 

I'm learning myspace css as I go...

 

Can any help?

 

My codes are as follows:

 

 

body{

background-position:top center;margin-top: ;}

 

div.topbanner {

top: 0;

left: 20%;

margin-left: -200px;

width: 100%;

height: px;

position: absolute;

}

 

MY PIC URL IN HERE

 

body{background:url("MY 2ND PIC URL IN HERE") left repeat-y;}

 

 

Body{margin-top: 300; background-color:black; background-attachment: fixed; background-position: top center; background-repeat: no-repeat; scrollbar-track-color:v; scrollbar-face-color:000000; scrollbar-highlight-color:abaaaa ; scrollbar-base-color:000000; scrollbar-DarkShadow-color:red; scrollbar-Shadow-color:white; scrollbar-arrow-color:red; cursor: url(http://www.fileden.com/files/2009/1/22/2279715/ND.cur); a:hover{cursor:url(CURSOR PIC URL HERE);}

 

 

Thank you

Posted

The position: absolute method of centering is to use left: 50%; margin-left: negative half the div or image width; so edit:-

body{

background-position:top center;margin-top: ;}

 

div.topbanner {

top: 0;

left: 50%;/*was 20%;*/

margin-left: -200px; /*edit to - half the width*/

width: 100%;

height: px;

position: absolute;

}

 

 

You should not have a div in between style tags in the head section, move it into the body section.

  • 3 weeks later...
Posted

Hey Wickham or anyone else

 

Your good advice has solved part of my problem.

 

My top banner image now stays fixed on different screen resolutions when viewed on my pc and monitor BUT when viewed on an apple with a 22 or 24 inch screen the image shifts to the right!!!

 

Can you help me with me with keeping this image fixed on bigger monitors?

 

Cheers

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...