How to create a fixed background image on a web page.

Discussion in 'HTML & Website Design' started by software0098, Dec 15, 2009.

Thread Status:
Not open for further replies.
  1. #1
    To make the background imaged fixed or not scroll add the BGPROPERTIES="FIXED" code into the body statement as shown below.

    <BODY BACKGROUND="bg.gif" BGCOLOR="#000000" VLINK="#808080" BGPROPERTIES="FIXED" TEXT="#C0C0C0" LINK="#FF0000" ALINK="#0000FF"><CENTER>.
     
    Last edited: Dec 15, 2009
    software0098, Dec 15, 2009 IP
  2. dlb

    dlb Member

    Messages:
    203
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    35
    #2
    If you want to go the CSS route use the following markup

    body {
    background:url(bg.jpg) top center no-repeat fixed;
    }

    Top and center refer to the position of the screen your background will be placed at. No-repeat means the image won't tiled vertically or horizontally and fixed refers to making the background 'stick' - the effect we're looking for here. A small amount of research on each particular declaration will help you gain more control over your background image, so its worthwhile.
     
    dlb, Dec 15, 2009 IP
  3. kokozap

    kokozap Peon

    Messages:
    86
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    water mark !!! back ground so easy at front page !
     
    kokozap, Dec 15, 2009 IP
Thread Status:
Not open for further replies.