Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2011
    Thanked 0 Times in 0 Posts

    A sort of fixed position


    I was on the Saints Row website (http://www.saintsrow.com/) the other day and liked the footer thing which appears fixed to the bottom but when scrolled all the way down it reveals a bit more. Also, this site (http://www.wow-professions.com/) has something similar. One of the adverts down the side fixes itself when you scroll down.

    Is this done using just HTML & CSS if so, how is it done?
    Last edited by Skiroid; 02-20-2012 at 01:22 AM.

  2. #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Sydney, Australia
    Thanked 932 Times in 919 Posts
    For something to scroll sometimes and be fixed other times you need JavaScript to test where it is positioned in order to decide where it should be next. You can only do it with CSS if you want it permanently fixed in position either relative to the browser or relative to its container.
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts