Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Tony Segarra on November 1, 2010 at 8:28 pm

    Hey all,

    I’m in the process of designing a website. For most web pages i’ve visited in the past, when you scroll down, everything moves up on the screen. Including the background. I’ve seen a couple sites where the background image stays on-screen with only the text and other bits moving on. I would immensely appreciate it if someone were to give me some know-how on this.

    Thanks!

    Hassan Shahab replied 14 years, 10 months ago 3 Members · 5 Replies
  • 5 Replies
  • Fernando Mol

    November 2, 2010 at 1:11 am

    <style type="text/css">
    body
    {
    background-image:url('yourimage.gif');
    background-repeat:no-repeat;
    background-attachment:fixed;
    }
    </style>

  • Fernando Mol

    November 2, 2010 at 1:12 am

    Forget to say that I stole the code from here (saved me the hand code it):

    https://www.w3schools.com/css/css_background.asp

    As you see, is just a CSS definition that fixes the background image.

    background-attachment:fixed;

  • Tony Segarra

    November 3, 2010 at 2:52 am

    Thanks for that Fernando. But I can’t seem to make it work. I’m still pretty new to this so I might be putting the code in the wrong area.

  • Fernando Mol

    November 14, 2010 at 4:24 am

    It goes inside the head tags.

    You may want to read a little about CSS. There are a couple of tutorials here on the COW

  • Hassan Shahab

    June 30, 2011 at 9:03 pm

    very nice keep it going

    https://gulfesolutions.com/

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy