-
AuthorPosts
-
November 23, 2013 at 11:54 pm #4237
Tony T
GuestAfter much trial & error I’ve found I need to set min-width for #container to different values for pages with left sidebar and pages with no sidebar in order to get horizontal scrolling to work as I want. Could you give me an edit which would add a class to #container please which would let me distinguish between the two in the stylesheet (something like the class=”<?php echo frontier_option…… used for #main perhaps)? I’m using a frontier-child theme. Thanks for any help!
November 24, 2013 at 1:22 am #4238Ron
KeymasterThe <body> tag outputs classes that are unique per page and per page-template used. You can use it like this:
body.page-template-page-c-php #container {} body.page-template-page-sc-php #container {} body.page-template-page-cs-php #container {} body.page-template-page-scs-php #container {}
c = content
s = sidebarThough I’m quite unclear on what you are actually trying to do. Maybe there’s a better way.
November 24, 2013 at 6:23 pm #4242Tony T
GuestThanks Ron. I hadn’t spotted the different classes on the <body> tags. That will let me do what I think I need. I understand it looks confusing but I need the full-width page (just the one at the moment) to behave differently from the pages with a sidebar in the way they cope with different size screens and after exhaustive experimenting I’ve identified #container as the key. The original responsiveness.css works very well and only needs a little tweaking for my appplication so thanks for a nice build.
I’ll leave a review once I’ve finished developing the site, but this is my first venture into WordPress and I feel lucky to have hit on Frontier as a theme more-or-less from the outset. More luck than skill! I’m comfortable with HTMl and css and know a moderate amount of Perl, but php is a new experience and I couldn’t work out how to add a class to #container. Your solution’s much better because I don’t have to edit a template file.
Thanks again, and for a prompt reply!
-
AuthorPosts
- The forum ‘WordPress Themes’ is closed to new topics and replies.