website design help with image in html page

Discussion in 'HTML & Website Design' started by webfreelance, Apr 17, 2009.

  1. #1
    I have one graphic .gif image
    which i want to remain fix in one place even if the page is scrolled.

    is it done with javascript?
    i have seen css tutorials.. but i still dont know how it is implemented seprately

    in html tags i can create css style..

    but seen that most of sites have seprate css tag which is used every where in their site.

    how do we do it?
     
    webfreelance, Apr 17, 2009 IP
  2. Rad_Dev

    Rad_Dev Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can do it with styles. Add the css code to the header of the page and then add the class to the body or table (or whatever) tag. should look something like this...

    .bg_image {
    background-image: url(images/bg_image.gif);
    background-attachment: fixed;
    }

    <body class="bg_image">
     
    Rad_Dev, Apr 17, 2009 IP
  3. webfreelance

    webfreelance Peon

    Messages:
    53
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    okay thanks mate.
    thanks for the answer but i dont need it as background as this image is clickable. as if chat window.

    thanks
     
    webfreelance, Apr 23, 2009 IP
  4. katendarcy

    katendarcy Peon

    Messages:
    115
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Have you tried position:absolute? You'd obviously need to add some other styles to it too, but it might be a start. ;)
     
    katendarcy, Apr 23, 2009 IP
  5. thr3146

    thr3146 Active Member

    Messages:
    182
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Did you get it fixed, if not pm me I have a solution for you.
     
    thr3146, Apr 23, 2009 IP
  6. newlogo

    newlogo Peon

    Messages:
    3,931
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i can also help u out prof.
     
    newlogo, Apr 23, 2009 IP