Fix header div when scrolling

Discussion in 'Web Design' started by robertnorgren, Feb 24, 2017.

to remove all ads.
  1. robertnorgren

    robertnorgren New Member

    Messages:
    22
    Hi all!

    I've been working a little on my portfolio site http://www.robertnorgren.com/

    I have set up three columns holding the header, a middle thumbnail column and a right thumbnail column.

    Based on the current code, is there a way I could fix the header column? If I set "position:fixed" stuff gets messed up.

    Any ideas? Much appreciated.
     
  2. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,637
    Use position: fixed; only in a position: relative parent if you want to control it.

    Have a read at my Karma Sutra of CSS
     
    robertnorgren likes this.
  3. robertnorgren

    robertnorgren New Member

    Messages:
    22
    Thank you. That got me thinking and I figured it out setting the first column as fixed and putting "left: 33%" on the two other columns to reposition them.
     

Share This Page