[Resolved] sidebar expand height

Home Forums Support sidebar expand height

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #91901
    elguavas

    hi there, great theme, just what i was looking for! AFter trying the free version i opted for gp premium becuse i wanted a few of the addons. πŸ˜‰

    i have my them set up with separate containers for content, with a sidebar on the left, and i’m using the background color showing through the space between content containers as a pleasant visual divider.

    what i’d like to do is have the sidebar expand it’s height so that it’s always the same height as the content (with the widgets aligned at the top), even if the sidebar widgets are few.

    i’m happy tp achieve this via a child theme if required. is it possible? can you tell me what css changes to make to get this outcome?

    thanks.

    #91945
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Glad you’re enjoying the theme!

    This thread should be useful to you: http://generatepress.com/forums/topic/equal-length-columns/page/2/?view=all#post-38550

    Let me know πŸ™‚

    #91960
    elguavas

    thanks tom.

    if i post that code in the wp_footer hook then the sidebar is indeed kept the same length as the content, however, the ‘padding’ in the sidebar shows as plain white not as my (dark) sidebar background color.

    also, i’d like the content to always stay the same height as the sidebar, so they’re always the same height (if the sidebar is taller), so can i somehow apply the auto expanding change to the content area as well? ie. the side bar and content will always be the same height, whichever is taller.

    cheer.

    #92219
    Tom
    Lead Developer
    Lead Developer

    In that code you’ll see I set the color as white (#FFFFFF) – you’ll have to modify this to your desired color.

    Either element will automatically fit to the tallest element – so if the sidebar is taller, the content will match the height, and if the content is taller the sidebar will match the height.

    Hope this helps πŸ™‚

    #92374
    elguavas

    thanks again tom, your timely replies have made me even happier that i chose the theme!

    in that code you’ll see I set the color as white (#FFFFFF) – you’ll have to modify this to your desired color.

    yep, found this after looking at the pasted code, works fine.

    Either element will automatically fit to the tallest element – so
    if the sidebar is taller, the content will match the height, and if the content is taller the sidebar will match the height.

    my problem here was i forgot to tick “Execute PHP” in the gp hooks area. having done that it works as expected. πŸ˜‰

    now another small question, but i’ll start another thread to keep things organised.

    cheers.

    #92375
    elguavas

    hmm, apologies for the wierd quoting above where is syays i said what you actually said… :\

    i tried editing my bbcodes to [quote=”Tom”], but from here at least it still says “elguavas wrote”, *shrug*

    #92386
    elguavas

    uhh, spoke too soon, it doesn’t matter what the setting of “Execute PHP” is, the sidebar will expand in height, but the content area will not. :\

    am i inserting the right piece of code in the right place?

    #92410
    Tom
    Lead Developer
    Lead Developer

    Can you link me to your site so I can take a look?

    #92412
    elguavas

    it’s still under development, so on my intranet only.

    there doesn’t see to be a way to attach a file in this forum?

    #92417
    elguavas

    so, to clarify i’ve made no mistake:

    1. can you give me the definitive link to the final version of that code?

    2. i’m meant to paste it in the wp-footer hook?

    3. does it matter if “Execute php” is checked?

    thanks.

    #92420
    Tom
    Lead Developer
    Lead Developer

    1. This should be it: http://generatepress.com/forums/topic/equal-length-columns/page/2/?view=all#post-38550

    Look through the rest of the posts in that topic, as you may find a solution that works.

    2. Correct.

    3. No need – there’s no PHP in there.

    You may need to add a color to .site-main as well:

    .site-main {
          background: #whatever;
    }
    #92421
    elguavas

    1. This should be it: http://generatepress.com/forums/topic/equal-length-columns/page/2/?view=all#post-38550

    Look through the rest of the posts in that topic, as you may find a solution that works.

    yeah, that’s the code i used. i re cut and re pasted it just to make sure.

    2. Correct.

    that’s where it is.

    3. No need – there’s no PHP in there.

    thought so.

    You may need to add a color to .site-main as well:

    .site-main {
    background: #whatever;
    }

    just changing the color in the pasted code seems to work fine for the sidebar at least.

    but, with all those thigs checked, i still have only the sidebar growing if the content is taller. if the sidebar is taller the content doesn’t grow. :\

    #92422
    Tom
    Lead Developer
    Lead Developer

    The issue is probably .site-main not having a background color, as that’s the element the height gets applied to.

    If that doesn’t work, I’m afraid I would have to actually see the website in action to debug further – maybe throw something up on a temporary URL?

    #92423
    elguavas

    yup, that was it. i was stoopidly thinkin that i only needed that .site-main css if the expanded background colour fix in the inserted code didn’t work.

    i’ve added a .site-main css stanza to my custom css and now it’s working fine.

    sorry for the static. πŸ˜‰

    #92424
    Tom
    Lead Developer
    Lead Developer

    Awesome! Glad that did the trick πŸ™‚

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.