I am trying to keep the background of my website a transparent black with white text and change the background of my blog posts to a solid white with black text. Does anyone know how to add custom CSS for this? Any help would be much appreciated. Thanks in advance.
asked Mar 12 '13 at 20:32 by ryanwired 11●1●1●2
There is a way, but whatever code you add will be loaded with every single page on your site, whether or not it's needed.
So, the first thing you will have to do is find the unique collection ID for your blog posts, without it you would be styling all of the other pages too.
Finding your blog's ID
Adding inline CSS
I'm suggesting using transparent on the wrapper so that you only have to set the color once on the body element, but you can just copy the body color there too.
The resulting code would (using the collection ID from previously as an example) look like:
Or, linking to a CSS file
If you wanted to change more of the blogs CSS, you might want to upload the CSS as a file. That requires a few more steps, first link to it in the Code Injection > Header:
Just take the CSS you would have put in the Header block and strip out the <style> tags so it should look like:
Save it as mystyles.css (or whatever you'd prefer) then upload the CSS file:
There's more about file management in the help article, Uploading and Managing Files.
You can read a lot more about the different methods of adding CSS at Matthew James Taylor's blog: Four methods of adding CSS to HTML.
answered May 27 '13 at 19:38 by neeklamy 2.4k●2●8