Jump to content

Is it important to define body elements first?


SandySynaptik

Recommended Posts

Is it important to define body element first before defining div elements? like:

body { background : #123456;} #div1 { foo: bar;}

or is it also valid if div element is written first, like:

#div1 { foo: bar;}  body { background : #123456;}

Link to comment
Share on other sites

Well, it's valid, just that browsers, will first of all assign the color to the div, before the body. For some reasons, it is best to make the #body be the first..." GOD created heaven and earth, before the animals/humans and not the other way round...Lol..." make the #body 1st!

Edited by eTianbun
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...