By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,460 Members | 1,193 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,460 IT Pros & Developers. It's quick & easy.

My Space Banner Dilemma

P: 1
Hi
I have created a banner at the top of my bands myspace:

Jelly’s Last Jam on MySpace Music - Free Streaming MP3s, Pictures & Music Downloads

and I wanted the image to remain as the background when you scroll down as in this page:

Franz Ferdinand on MySpace Music - Free Streaming MP3s, Pictures & Music Downloads

Can anyone help?

current code:


Expand|Select|Wrap|Line Numbers
  1. </style>
  2.  
  3.  
  4. <style type="text/css">
  5. body{ 
  6. background-position:top center;margin-top: 872
  7.  ;}
  8. div.topbanner {
  9. top: 0;
  10. left: 49%;
  11. margin-left: -750px;
  12. width: 100%;
  13. height: 872px;
  14. position: absolute;
  15. }
  16. </style>
  17. <div class="topbanner"><IMG SRC="http://s235468517.websitehome.co.uk/myspace/banner.jpg" border="0"></div>
  18.  
  19.  
  20. <style type="text/css">
  21. .nametext {
  22. display:block;
  23. width:291px;
  24. height:168px;
  25. background-image:url(http://s235468517.websitehome.co.uk/myspace/bandname.jpg);
  26. padding: 0;
  27. margin: 0;
  28. text-indent: -9999px;
  29. }
  30. </style>
many thanks
Jan 11 '09 #1
Share this Question
Share on Google+
2 Replies


eWish
Expert 100+
P: 971
Add this to your style sheet where you want the background image to be fixed.
Expand|Select|Wrap|Line Numbers
  1. background-repeat: no-repeat;
  2. background-attachment: fixed;
CSS Background Properties

--Kevin
Jan 11 '09 #2

Markus
Expert 5K+
P: 6,050
Simply set the image as the background and push the page content down, making the image appear as a masthead.
Jan 12 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.