Community Forums › Forums › Design Tips and Tricks › Separate style sheet for executive theme inside pages?
Tagged: css style sheet, Executive theme
This topic contains 10 replies, has 2 voices, and was last updated by zmel 3 months ago.
-
AuthorPosts
-
December 26, 2012 at 7:26 pm #7603
I have customized home.php and am using a scaleable background image in the CSS. But I want a different scaleable background image for the inside pages. Is it possible to create a second style.css doc and attach it to the rest of the site (i.e. not the home page) with that information? I am thinking style-inside.css and linking it in header…? Thanks for your suggestions.
December 27, 2012 at 12:39 am #7660I would just use the body class to specify a different background for the other pages. So, something like this:
.about body {
background: url(images/yourphoto.png);
}You can assign custom body classes for each page under the section where you can select your page layout (2 or 3 columns). Or you can simply view the source code and find a line similar to this near the top:
<body class=”page page-id-12 page-template-default logged-in header-full-width header-image full-width-content”>
In this case, you would use .page-id-12. Obviously, your page id number will be different for each page.
Susan Nelson | Oh, Hello Designs | Twitter | Facebook
Community Theme Developer: Pure EleganceJanuary 18, 2013 at 9:16 pm #13022Thank you for the detailed instructions! I added this to my css:
.inside-bg body {
background: url(images/bg-inside1.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}…uploaded css and image, and went into Edit/Page and added
.inside-bg
to the custom body class field.
And nothing happened
(Could it be because I have the home page bg image in the #wrap?
January 18, 2013 at 9:18 pm #13023Can you post a link to your site?
Susan Nelson | Oh, Hello Designs | Twitter | Facebook
Community Theme Developer: Pure EleganceJanuary 18, 2013 at 9:30 pm #13024I don’t want to list a live link in the forum to a dev site. Can I screen shot something?
January 18, 2013 at 9:31 pm #13025No, a screenshot won’t help. I would need to see the code in order to troubleshoot the issue.
Susan Nelson | Oh, Hello Designs | Twitter | Facebook
Community Theme Developer: Pure EleganceJanuary 18, 2013 at 10:46 pm #13029OK, here it is:
January 19, 2013 at 3:35 am #13044Okay, I see what’s going on. Yes, it’s not working because the image is placed on the #wrap. So, in this case, you would do something like…
.inside-bg #wrap
Let me know if that doesn’t work.
Susan Nelson | Oh, Hello Designs | Twitter | Facebook
Community Theme Developer: Pure EleganceJanuary 23, 2013 at 8:59 pm #14225That DOES work. The next level would be for it to work for ALL posts without having to include it in every single post as a custom body class. Is that possible? Thank you so much for your help.
January 24, 2013 at 1:35 am #14258Are all blog posts going to share the same background? And will all pages share the same? If yes, you could try something like .single #wrap (for single blog posts) or .page #wrap (for all pages).
Susan Nelson | Oh, Hello Designs | Twitter | Facebook
Community Theme Developer: Pure EleganceFebruary 11, 2013 at 3:01 am #19553That final style does work without having to add it when creating every post or page. Neat!
-
AuthorPosts
You must be logged in to reply to this topic.