Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS make div fixed after scrolling towards bottom of it

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #156136
    eric
    Participant

    I have a div with an image in it, and a title above it and towards the bottom center of it.

    I have paragraphs/information below the image/title div and would like the area that you can see the title to be ‘fixed’ once the user scrolls far enough down the page to become a header for the content relating to it below.

    Any help is greatly appreciated, thank you.

    #156190
    Tom Houy
    Participant

    Are you talking about something like a fixed header, similar to what was often done with frames years ago?

    You could set the header DIV to a position of “fixed”, as in the example below:

    http://cdpn.io/bqIjL

    #156475
    eric
    Participant

    Tom Houy, you sort of had it, but Ed knows what I am talking about.

    Would it be possible to do that effect with just a chunk of the element showing (say if it were much taller and only the bottom 50px were to be visible once the entire element become fixed, it would be then at the top of the screen as a header element).

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.