#holycow [list-type:none; margin:2; padding:2; border-top:solid 1px #333; ] the above css can markup like this..? <ul id="holycow"><li id="holycow"><a href="#">it works?</a> can this be done? One more thing.. Can i assign anchor rule for <h1> like h1 a (rules here)? Note.. '(' means curly brace. Writing from my phone and it doesn't have that character.
css ul li a. is this possible?
Yes, if I'm reading what you are looking for correctly then it certainly is possible. However, since IDs should be unique you should use classes instead of IDs to apply the styles:
Applies to:
Also, yes you can do exactly what you wrote as your second question;
That will make any <a> tag within a <h1> element green.
You can even extend that and go for something like the following:
That will make the text within any <span> element with the id "MyContent" which is also within a <h3> element of the "minHeader" class.
| Code: |
| .holycow {list-type:none; margin:2; padding:2; border-top:solid 1px #333; } |
Applies to:
| Code: |
| <ul class="holycow"> |
Also, yes you can do exactly what you wrote as your second question;
| Code: |
| h1 a {color: #00FF00;} |
That will make any <a> tag within a <h1> element green.
You can even extend that and go for something like the following:
| Code: |
| #MyContent h3.minHeader span
{ color: #FF0000; } |
That will make the text within any <span> element with the id "MyContent" which is also within a <h3> element of the "minHeader" class.
thanks. i guess i am getting to intermediate level of css with help from u guys in this forum. thanks again
