Inheritance of properties using ID’s
When using an ID of a selector, always remember that the ID inherits the properties unless redefined in the selector.
So, if you have
td {
Background-image:url(image1.jpg);
Background-color:#000000;
}
td#one{
color:#444
}
That the “one” id will inherit the background-image and color from the td selector. Either those properties need to be redefined, or set to none, e.g.
Td#one {
Background-image:none;
Background-color:#ffffff;
color:#444;
}
Note:For a repeaint color hex code, writing it in this format#444 is shorthand to save code space if the digits keep on repeating.
Here are some similar arcade posts
- I have seen three digit hex codes to define color. What are they? How do three digit hex color codes work?
- How do I reduce the size of my CSS file? Can you teach me some “shorthand” tricks?
- Design your own CSS website Part 1: The Wrapper
- How do I change the background matte color when working in Photoshop? How do I change the gray color in the gutter area of Photoshop?
- 8-Bit Color Channel vs. 16-Bit Color Channel
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.











Comments
No comments yet.
Leave a comment