Forums

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

Home Forums CSS Full height sidebar

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #42764
    FardeemMunir
    Member

    Hey guys,
    I want a full height sidebar floated to the left of a page. It should be height 100% all the time so no matter where I am on the page the sidebar is there. (Yeoman.io) http://yeoman.io does the height thingy with javascript but I was looking for a css only solution. Also the WordPress admin does it but there is a lot of code and I can figure out anything.

    #124814
    Paulie_D
    Member

    It depends on your structure by this works: http://codepen.io/Paulie-D/pen/mLerk

    #124820
    DustinWoods
    Member

    The CSS property you’re looking for is position: fixed

    #124822
    Paulie_D
    Member

    >The CSS property you’re looking for is position: fixed

    No…I don’t think it is unless the sidebar is not supposed to scroll with the rest of the page.

    Anyway, position:fixed does nothing to set height.

    #124850
    FardeemMunir
    Member

    Well, if I add a ton of new stuff in the main area then 2 things happen
    – The sidebar doesn’t expand in height to take up the whole area.
    – Even the main area doesn’t contain all the text.

    (http://codepen.io/FardeemMunir/pen/txwid)[http://codepen.io/FardeemMunir/pen/txwid]


    @DustinWoods
    No, I don’t want the sidebar to be fixed.

    #124853
    Paulie_D
    Member

    Weird…that should work…I’ll have another think.


    @joshuanhibbert
    Yeah..but aren’t there other issues with ‘table’ styles?

    Width issues & alignments etc.? My memory is a little fuzzy this morning.

    #124897
    wolfcry911
    Participant

    I agree with joshua, display: table-cell is a great way to accomplish this.

    Here is another, older but still viable, option:
    http://codepen.io/wolfcry911/pen/bJCfl

    #124903
    Paulie_D
    Member

    Damn….that what I was trying to remember! :)

    #124869
    PicnicTutorials
    Participant

    I needed my main to be minimum as high as my sidebar. I did something real easy. #main:after {top:0;bottom:0;}. And gave it the container styling. Worked perfect.

    #124904
    Paulie_D
    Member

    Ugh…..

    #124952
    PicnicTutorials
    Participant

    @Paulie_D

    The main container here http://www.websitecodetutorials.com/ if you care to see what I mean.

    #141463
    Rai
    Member

    Mmm not sure about this answer, weird to use table options to solve this. I´m looking for other solution.

    #141478
    dgriesel
    Participant

    Flexbox would be an option, although it is not very well supported.

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