CS question

W

_Who

I thought when two things appear together in a css file the rule applies to
all of them. In the following: h1, h2, h3 and h4 all have a family and
margin specified.

h1 h2 h3 h4{

font-family: Arial, Helvetica, San Serif;

margin-bottom: 2pt;

margin-top: 2pt;

}



Assuming the above statement is correct the following statements have me
confused. The entries below had many more entries between them but I select
ones containing "A.Visited". It seems to me that each one would redefine
A.Visited and only the last one would be effective.



Or does, for example, the first one say: If an element has the ID "menuitem"
and an "A" tag then A.Visited color is #FFFFFF??

If that is the case it appears to be in contradiction to what I said above
about the h's.

Can you straighten this out?

Thanks



#menuitem A:Visited {

color: #FFFFFF;

}

A:Visited {

color: #003399;

text-decoration: none;

}

..bottomnav A:visited {

font-size: 8pt;

color: #F0E68C;

}
 
B

bruce barker

you have the wrong syntax.

h1 h2 {....}

means apply css to a h2 thats a child of a h1. to condense use the
comma, not the space:

h1, h2, h3, h4 {....)


-- bruce (sqlwork.com)
 
W

_Who

Thanks, that's what I been missing

bruce barker said:
you have the wrong syntax.

h1 h2 {....}

means apply css to a h2 thats a child of a h1. to condense use the comma,
not the space:

h1, h2, h3, h4 {....)


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,178
Latest member
Crypto Tax Software
Top