Site icon Catch Themes

Can't increase $content_width in child theme

Hi and thanks for this free nice theme which so far is also proving to be very solid. First I'd like to say that this has been cross-posted to https://github.com/Automattic/jetpack/issues/1989# because I'm not sure where the problem is coming from. Basically I wanted to enlarge the theme content area (for single column layout) to take more space and I easily accomplished that with:
.no-sidebar.content-width #main {
   width: 920px;
}
Everything is ok with this, except pictures contained in a Jetpack tiled gallery (which is a mosaic like kind of gallery), would not fill the new available width, giving the impression that the gallery is aligned to the left, while the gallery container is actually correctly centered ("tiled-gallery type-rectangular" div). So Jetpack devs stated that it could be because their gallery is dependant on the existance of a $content-width value (http://jetpack.me/support/tiled-galleries/#content-width) which obviously is already set in your theme. What I tried then was to increase $content_width in my catch-base child theme's functions.php to a higher value than the one set in inc/catchbase-core.php (780) setting it to 900. But for some reason this doesn't work, and the gallery would only look centered (i.e. the images in it would fill it completely) only if .no-sidebar.content-width #main is not higher than the original 820px. With one big exception, that is, when I change $content_width in the parent theme (catch-base itself)! In that case everything works as expected. I'm kindly asking if you could give me a hand here.. because not exactly being a Wordpress hero, this had me totally frustrated for the last 4 hours... Thanks a lot, really! A dozen +1 to you in adv! :)
Exit mobile version