Grow your CSS skills. Land your dream job.

position relative AND fixed

  • # May 26, 2010 at 5:06 pm

    can an element be position both relative AND fixed.

    # May 26, 2010 at 6:35 pm

    Yep!

    # May 28, 2010 at 9:25 pm

    I’m gonna go with "nope" =)

    But of course the context is what matters here. I’m sure whatever you are thinking of can be done only needing one of the two.

    # May 28, 2010 at 9:51 pm

    Hi Chris,

    As you know once you give it position fixed any inner AP element will be positioned relative to it’s container wih PF. But… you could postion that position fixed element with position relative via top/left. So YES you can use both. Untested but I see no reason why that would not be the case.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".