Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

image at bottom of screen ? how ?

Options
  • 18-02-2008 12:59pm
    #1
    Registered Users 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 Posts: 68,317 ✭✭✭✭seamus


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


  • Registered Users 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 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