Archived

This topic is now archived and is closed to further replies.

  • 0

custom.css vs CSS Rules box

Question

Posted · Report post

How do the custom.css file vs the code in the CSS Rules box relate to one another? Where does the code go that is in the CSS Rules box? Is it appended to custom.css. Lastly, if you have code in custom.css and code in CSS Rules box, do they play nice together, or will the references to them get mixed up? Thanks, Nick

Share this post


Link to post
Share on other sites

6 answers to this question

Posted · Report post

The CSS Rules box is appended to custom.css.

Share this post


Link to post
Share on other sites

Posted · Report post

Actually that is not correct. The CSS rules in the code options get appended to the bottom of the header. If you place code in there and then view the source you'll see what I'm talking about. The code from custom.css is a linked stylesheet like the others. In terms of hierarchy both will override default styles. If you have a lot of styles to change it would be easier to navigate around an actual file like custom.css then it would be to use the small window provided by the css rules box.

Share this post


Link to post
Share on other sites

Posted · Report post

thanks for the clarification. so just to be sure, would this piece of code work the exact same way if I cut it from custom.css and pasted it into the CSS Rules box?

body.home div.wp-pagenavi {
		display: none;
	}

If I did that, that leaves custom.css a 100% empty file. Just wanted to double check that the code is formatted OK if moved, and if there has to be any shell formatting for custom.css vs. being completely empty.

Share this post


Link to post
Share on other sites

Posted · Report post

The reason I ask is, when I do move that code from custom.css to the CSS Rules box, it stops working- I see page numbers on the home page. If I move it back, it works again. I'm just trying to figure out why that would be if they're essentially equal. nick

Share this post


Link to post
Share on other sites

Posted · Report post

Yeah the format would be the same there is no shell required. Also, just to clarify the body{} that is in the css box doesn't need to be there, it's just there for example.

Share this post


Link to post
Share on other sites

Posted · Report post

I'm not sure why the same exact code, below, would work when in custom.css but not in the CSS Rules box. But this is resolved b/c I at least understand how it is supposed to work.

body.home div.wp-pagenavi {
	display: none;
	} 

Share this post


Link to post
Share on other sites