How to keep the background picture fixed when scrolling

  • hagmar66
  • Newbie
  • Newbie
  • hagmar66
  • Posts: 12

Post 3+ Months Ago

How To put a fixed picture in the background that stays fixed as i scroll
im just a begginer so please can you help me : :shock: :?:
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

in css:
Code: [ Select ]
  1. body{
  2.   background-image:url(path/filename.ext);
  3.   background-attachment:fixed
  4. }

This will work if you are using it on the body of the document. If you are using it on a different element then 99% chance it will display wrong in internet explorer.

If using it on the body then you'll be fine, if using it elsewhere on the page I will write a quick hack for you :D
  • Genius
  • Genius
  • User avatar
  • Posts: 6358
  • Loc:

Post 3+ Months Ago

since you are a beginner, I would recommend you do some searching on the boards for answers before posting. More than likely you questions will have been asked multiple times, including this one.

welcome to ozzu. :)
  • Tom the Great
  • Expert
  • Expert
  • User avatar
  • Posts: 723
  • Loc: B.C., Canada

Post 3+ Months Ago

If you don't want to use CSS, just put this in the body tag
Code: [ Select ]
<head >BLAH BLAH</head>
<body bgproperties="fixed" background="yourpic">

~rest of the page~
  1. <html>
  2. <head >BLAH BLAH</head>
  3. <body bgproperties="fixed" background="yourpic">
  4. ~rest of the page~

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 22 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-2017. Ozzu® is a registered trademark of Unmelted, LLC.