Static backgrounds

  • veedee
  • Graduate
  • Graduate
  • User avatar
  • Posts: 110

Post 3+ Months Ago

Hi ..
Can somebody tell me how to make a background keep in position (not scrolled), while you scroll the page vetically,
here the example http://coder4u.com/
is it javascript thing?

thankyou
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

use css.

Code: [ Select ]

body {
background-image: url('ur.lto.image.here'];
background-attactment: fixed;
background-repeat: no-repeat;
}
  1. body {
  2. background-image: url('ur.lto.image.here'];
  3. background-attactment: fixed;
  4. background-repeat: no-repeat;
  5. }
  • Hacker007
  • Proficient
  • Proficient
  • User avatar
  • Posts: 371
  • Loc: Riverside, CA

Post 3+ Months Ago

http://coder4u.com/styles.css

Code: [ Select ]
BODY {
    background-image : url("salon1.jpg");
    background-repeat: no-repeat;
    background-position: 0 0;
    background-attachment: fixed;
    font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size : 8pt;
    font-style : normal;
}
  1. BODY {
  2.     background-image : url("salon1.jpg");
  3.     background-repeat: no-repeat;
  4.     background-position: 0 0;
  5.     background-attachment: fixed;
  6.     font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
  7.     font-size : 8pt;
  8.     font-style : normal;
  9. }

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 24 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.