| Styling of Elements Within Class Applying to Entire Document
|
kposs

msg:4309050 | 10:37 pm on May 6, 2011 (gmt 0) | I am trying to style elements only within the DIV of class "fmodule", but the styles are applying to the entire document.
.fmodule h1,h2 {margin-top:30px;margin-bottom:12px; font-family:Arial,Helvetica,Verdana,sans-serif; color:#545454} .fmodule h3,h4,h5,h6 {margin-top:30px;margin-bottom:8px; font-family:Arial,Helvetica,Verdana,sans-serif; color:#2ca9e4} .fmodule h1,h2,h3,h4,h5,h6 {text-transform:uppercase;} If I change it to the following syntax, it works
h1.fmodule,h2.fmodule {margin-top:30px;margin-bottom:12px; font-family:Arial,Helvetica,Verdana,sans-serif; color:#545454} h3.fmodule,h4.fmodule,h5.fmodule,h6.fmodule {margin-top:30px;margin-bottom:8px; font-family:Arial,Helvetica,Verdana,sans-serif; color:#2ca9e4} h1.fmodule,h2.fmodule,h3.fmodule,h4.fmodule,h5.fmodule,h6.fmodule {text-transform:uppercase;} but it seems as if it should only work if I have a class specified for each element, which I do not.
<h1 class="fmodule"> thanks, Valerie
|
Fotiman

msg:4309109 | 2:09 am on May 7, 2011 (gmt 0) | The problem is your selectors. You have: .fmodule h1, h2 But I think what you are trying to achieve is: .fmodule h1, .fmodule h2
|
kposs

msg:4309197 | 7:27 am on May 7, 2011 (gmt 0) | You are correct! Worked as expected. Appreciate it.
|
|
|