Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

image at bottom of screen ? how ?

  • 18-02-2008 11:59AM
    #1
    Registered Users, Registered Users 2 Posts: 648 ✭✭✭


    Hi

    im building a webpage and i want to put an image at the bottom of the screen - not the bottom of the page - and when we scroll down the page the image stays at the bottom of the browser screen

    anyone know how i do that ?

    thanks


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Little CSS magic.

    body
    {
    background-image:url('smiley.gif');
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:bottom;
    }


  • Registered Users, Registered Users 2 Posts: 68,173 ✭✭✭✭seamus


    Check out CSS positioning and using the "static" option.


  • Registered Users, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


    a different bit of CSS magic :

    CSS:
    #bottom-div {
        position : static;
        bottom : 0px;
        height : 100px;
        width : 100%;
    }
    

    HTML :
    <div id="bottom">Look at me! I'm at the bottom!</div>
    


    ...a little bit more flexible than aidan_walsh's example, I think (you can ensure that it sits above the content, for one thing)... but both have similar results.


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    Goodshape wrote: »
    a different bit of CSS magic :

    CSS:
    #bottom-div {
        position : static;
        bottom : 0px;
        height : 100px;
        width : 100&#37;;
    }
    

    HTML :
    <div id="bottom">Look at me! I'm at the bottom!</div>
    


    ...a little bit more flexible than aidan_walsh's example, I think (you can ensure that it sits above the content, for one thing)... but both have similar results.
    +1


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Goodshape wrote: »
    a different bit of CSS magic :

    CSS:
    #bottom-div {
        position : static;
        bottom : 0px;
        height : 100px;
        width : 100&#37;;
    }
    

    HTML :
    <div id="bottom">Look at me! I'm at the bottom!</div>
    


    ...a little bit more flexible than aidan_walsh's example, I think (you can ensure that it sits above the content, for one thing)... but both have similar results.
    True that. Belted out that example fairly quick between calls at work :)


  • Advertisement
Advertisement