wow Posted February 7, 2009 Report Share Posted February 7, 2009 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; } 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 Quote Link to comment Share on other sites More sharing options...
Wickham Posted February 8, 2009 Report Share Posted February 8, 2009 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. Quote Link to comment Share on other sites More sharing options...
wow Posted February 9, 2009 Author Report Share Posted February 9, 2009 Hey Wickham That's brilliant, thank you so much. Much appreciated. All the best to you! Cheers Quote Link to comment Share on other sites More sharing options...
wow Posted March 1, 2009 Author Report Share Posted March 1, 2009 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.