This is the existing code for the hr tags in my CSS style sheet. hr { margin:0; padding:0; border:none; height:1px; background:#5294c1; } Code (markup): I want the hr tags to be styled differently inside of a table. This is what I tried, but it does not work: table.hr{ background:#333; } Code (markup): How can I style the hr tags differently when they're inside a table? I can style each tag individually inside the HTML, but that is not a good solution. .
table.hr{ background:#333; } Code (markup): is wrong because you put a period in between table and hr. You only put a period when defining a class. Just try and see how it works for you.. table hr{ background:#333; } Code (markup):