Jump to content


Photo
- - - - -

Proper element ordering for CSS

css elements

Best Answer James B , 28 May 2013 - 09:42 PM

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.

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 mbreese1

mbreese1

    Advanced Member

  • Members
  • 39 posts
  • Framework Version:Pro
  • Country: Country Flag

Posted 28 May 2013 - 03:50 PM

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



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 28 May 2013 - 05:04 PM

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 

Please Login or Register to see this Hidden Content

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.



#3 mbreese1

mbreese1

    Advanced Member

  • Members
  • 39 posts
  • Framework Version:Pro
  • Country: Country Flag

Posted 28 May 2013 - 08:09 PM

Thank, Rob!

 

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

 

Bree



#4 James B

James B

    Advocate

  • Moderators
  • 4983 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 28 May 2013 - 09:42 PM   Best Answer

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.



#5 mbreese1

mbreese1

    Advanced Member

  • Members
  • 39 posts
  • Framework Version:Pro
  • Country: Country Flag

Posted 28 May 2013 - 09:54 PM

Alright- thanks guys!







Also tagged with one or more of these keywords: css, elements