pstein Posted November 14, 2016 Share Posted November 14, 2016 Assume I have the following HTML code:< table ......... bgcolor="#334455">....< /table>Be aware that the bgcolor attribute is NOT placed in a separate CSS stylsheet but is embedded in the HTML code itself.Now I want to overwrite this bgcolor by another color. The following does NOT work:table { bgcolor: #ffffff !important; };ortable { bgcolor=#ffffff !important; };How else can I overwrite the color?Peter Link to comment Share on other sites More sharing options...
dsonesuk Posted November 14, 2016 Share Posted November 14, 2016 (edited) The bgcolor not a css declaration property, so it will never work, the equivalent for bgcolor in CSS is the background-color: property. The bgcolor attribute is not supported in html5, and it is has been advised for a long-time now, to use css background-color instead. Edited November 14, 2016 by dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now