Archived

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

  • 0

Proper element ordering for CSS


Question

Posted · Report post

Good morning :)
 

Just checking in to see if there is a list/image/infographic somewhere that show to correct order in which to put your custom CSS. I have a ton of customizations and I want to make sure that I have them ordered right so everything works correctly and I'm adhering as close as possible to best practices.

 

Thanks!
Bree

Share this post


Link to post
Share on other sites

4 answers to this question

Posted · Report post

Hi Bree

 

If you're using the base theme you won't need to add the body tag at the top of the style.css.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Bree,

 

Actually, there's no real order, but I generally prefer to keep body {} at the very top in Dashboard > PageLines > Site Options > Custom Code.

 

I recommend that you validate your custom CSS, which helps organize it too.  Go to  http://jigsaw.w3.org/css-validator/ and use the Direct Input Tab.

 

Copy your custom code, then paste it into the By direct input tab, where it will check all your code for errors.

Share this post


Link to post
Share on other sites

Posted · Report post

Thank, Rob!

 

Is this also the case if I'm using a base theme? And thanks for the link to the code validator!

 

Bree

Share this post


Link to post
Share on other sites

Posted · Report post

Alright- thanks guys!

Share this post


Link to post
Share on other sites