Image lock while page is scrolled?

Discussion in 'HTML & Website Design' started by URPad, Oct 4, 2010.

  1. #1
    I am lost to what it is called or how to do it. I would like to take the live support icon on my website which is at the bottom right of the pages. I would like to have it locked in place on the right side of the page. When the page is scrolled up or down the icon never moves. How do I do this?

    Here is my site.
     
    URPad, Oct 4, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Can't visit the site at this moment. use position fixed for the div or image.
     
    radiant_luv, Oct 4, 2010 IP
  3. exlvl

    exlvl Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    add this after direct url of img src
    style="position: fixed;"
    hope it works.. :)
     
    exlvl, Oct 5, 2010 IP
  4. shahilroyhere

    shahilroyhere Well-Known Member

    Messages:
    189
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    130
    #4
    You can try the following -

    <div id="rightBottomfixed">
    <!--Live Support Code -->
    </div>

    and in style or css -

    #rightBottomfixed {
    position: fixed; bottom: 0; right: 0;
    }
     
    shahilroyhere, Oct 5, 2010 IP
  5. URPad

    URPad Guest

    Messages:
    94
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for all the pointers. I am trying to get the live support to look like this site. I like for the button to me on the top right of the page so visitors can see it better.
     
    URPad, Oct 5, 2010 IP
  6. URPad

    URPad Guest

    Messages:
    94
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This has worked for me. However, I like to see about move the button more middle of the screen and not so much on the top right. How do I do that?
     
    URPad, Oct 5, 2010 IP
  7. arwen54

    arwen54 Active Member

    Messages:
    632
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    60
    #7
    you see this from shahilroyhere's post?

    #rightBottomfixed {
    position: fixed; bottom: 0; right: 0;
    }

    you will need to experiment with the bottom and right attributes

    something like this might work:

    #rightBottomfixed {
    position: fixed; bottom: 50%; right: 0;
    }

    I used percentages but you can also use px or em

    see this for usuage tutorial:
    http://www.quirksmode.org/css/position.html
     
    arwen54, Oct 5, 2010 IP
  8. URPad

    URPad Guest

    Messages:
    94
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    That works. I tried messing with the attributes but I now know why it was not working. I forgot to put the px at the end, lol. Thanks for the pointer.
     
    URPad, Oct 5, 2010 IP