Jump to content

CSS background


davej

Recommended Posts

Seems like there is some lazy use of the "shorthand" background in the CSS reference where the proper specific property would probably be a better choice. For example...

 

background: yellow;

 

...rather than...

 

background-color: yellow;

 

http://www.w3schools.com/cssref/css3_pr_background-clip.asp

 

I'm sure it works, but it doesn't seem like the best choice in a published reference.

 

Similar issues on these two pages...

 

http://www.w3schools.com/cssref/css3_pr_background-origin.asp

 

http://www.w3schools.com/cssref/css3_pr_background-size.asp

 

 

Link to comment
Share on other sites

At the bottom of the page there's a link labeled "REPORT ERROR" which notifies the W3Schools staff of errors on the particular page you clicked the link on.

 

There is a danger in using the background property when you just want to set one part, that being that you'll reset any other background properties that you had set earlier. Suppose you want to change the background color of an element on hover and you use just "background", then the background image will disappear.

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...