Hemlock Posted October 21, 2009 Share Posted October 21, 2009 Might be a tad a bit of a silly question, but I couldn't find it anywhere on google, but what is the selector to add attributes to all basic selectors, such as table, div, etc.regards Link to comment Share on other sites More sharing options...
jeffman Posted October 21, 2009 Share Posted October 21, 2009 * is the universal selector.* {background: #f00} will give a red background to every element on the page unless another selector overrides it. Link to comment Share on other sites More sharing options...
chibineku Posted October 21, 2009 Share Posted October 21, 2009 You can use * to assign a blanket attribute to everything, or set it to the body which will cause certain properties to be inherited all the way down through the document. Link to comment Share on other sites More sharing options...
Ingolme Posted October 21, 2009 Share Posted October 21, 2009 If you want to refer to all the tags of one kind, just write the tag name without any other symbols next to it, like this: table { border: 5px solid black; }div { padding: 10px; } Link to comment Share on other sites More sharing options...
Hemlock Posted October 21, 2009 Author Share Posted October 21, 2009 Thank you for the answers people Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.