veggieman001 wrote:
KrIsMa wrote:
veggieman001 wrote:
Actually, that should just be "h1" rather than ".h1", since it's the element rather than the class.Really? My HTML book says that .h1 applies this style sheet to all h1 elements.
That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).
Hm.
It worked for me.
Offline
mythbusteranimator wrote:
veggieman001 wrote:
KrIsMa wrote:
Really? My HTML book says that .h1 applies this style sheet to all h1 elements.That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).Hm.
It worked for me.
I could not open the code o.o
Offline
mythbusteranimator wrote:
veggieman001 wrote:
KrIsMa wrote:
Really? My HTML book says that .h1 applies this style sheet to all h1 elements.
That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).Hm.
It worked for me.
Odd.
It wouldn't really make sense for it to work because h1 isn't a class in this case; it's the element name.
Offline
mythbusteranimator wrote:
veggieman001 wrote:
KrIsMa wrote:
Really? My HTML book says that .h1 applies this style sheet to all h1 elements.That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).Hm.
It worked for me.
You have to just use "h1", not ".h1". ".h1" means it applies to all elements with the class "h1", not the element name "h1".
Offline
jvvg wrote:
mythbusteranimator wrote:
veggieman001 wrote:
That doesn't work.
In this example, if .h1 were applied to h1 elements, the header would be blue (because the latest instruction takes precedence).Hm.
It worked for me.You have to just use "h1", not ".h1". ".h1" means it applies to all elements with the class "h1", not the element name "h1".
THANK YOU SO MUCH! I WAS A BIT CONFUSED AND I THINK OTHER PEOPLE ARE TOO!
Btw,how do you make a ID style sheet that only works for a specific element, like H1?
#h1#someid{some CSS stuff}?
Offline
KrIsMa wrote:
jvvg wrote:
mythbusteranimator wrote:
Hm.
It worked for me.You have to just use "h1", not ".h1". ".h1" means it applies to all elements with the class "h1", not the element name "h1".
THANK YOU SO MUCH! I WAS A BIT CONFUSED AND I THINK OTHER PEOPLE ARE TOO!
Btw,how do you make a ID style sheet that only works for a specific element, like H1?
#h1#someid{some CSS stuff}?![]()
h1#specificid{
etc:etc;
}
and then for a class it's
h1.specificclass{
etc:etc;
}
Offline