- This topic has 14 replies, 2 voices, and was last updated 9 years, 5 months ago by Tom.
-
AuthorPosts
-
March 26, 2015 at 11:09 pm #91901elguavas
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.
March 27, 2015 at 12:02 am #91945TomLead DeveloperLead DeveloperHi 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 ๐
March 27, 2015 at 1:01 am #91960elguavasthanks 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.
March 27, 2015 at 9:05 am #92219TomLead DeveloperLead DeveloperIn 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 ๐
March 27, 2015 at 3:46 pm #92374elguavasthanks again tom, your timely replies have made me even happier that i chose the theme!
[quote=”Tom”]in that code youโll see I set the color as white (#FFFFFF) โ youโll have to modify this to your desired color.[/quote]
yep, found this after looking at the pasted code, works fine.
[quote=”Tom”]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.[/quote]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.
March 27, 2015 at 3:52 pm #92375elguavashmm, 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*
March 27, 2015 at 5:48 pm #92386elguavasuhh, 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?
March 27, 2015 at 10:15 pm #92410TomLead DeveloperLead DeveloperCan you link me to your site so I can take a look?
March 27, 2015 at 10:21 pm #92412elguavasit’s still under development, so on my intranet only.
there doesn’t see to be a way to attach a file in this forum?
March 27, 2015 at 10:26 pm #92417elguavasso, 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.
March 27, 2015 at 10:30 pm #92420TomLead DeveloperLead Developer1. 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; }
March 27, 2015 at 10:41 pm #92421elguavas[quote]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.[/quote]
yeah, that’s the code i used. i re cut and re pasted it just to make sure.
[quote]2. Correct.[/quote]
that’s where it is.
[quote]3. No need โ thereโs no PHP in there.[/quote]
thought so.
[quote]You may need to add a color to .site-main as well:
.site-main {
background: #whatever;
}[/quote]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. :\
March 27, 2015 at 10:42 pm #92422TomLead DeveloperLead DeveloperThe 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?
March 27, 2015 at 10:52 pm #92423elguavasyup, 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. ๐
March 27, 2015 at 11:04 pm #92424TomLead DeveloperLead DeveloperAwesome! Glad that did the trick ๐
-
AuthorPosts
- You must be logged in to reply to this topic.