N
Nathan Sokalski
I apologize for asking an ASP.NET newsgroup a question about CSS, but I do
not know of any CSS newsgroups. I have a page with many areas that are
composed of the following elements in the following layout:
<td class="mystyle">
<a></a>
<span></span>
<img/>
<span></span>
</td>
For the td element, I obviously used the following selector:
..mystyle{}
For the a and img elements, I would have thought I would use
td.mystyle>a{}
td.mystyle>img{}
Since the a and img elements are immediate children of the td element, but
this did not seem to work, but the following did:
td.mystyle a{}
td.mystyle img{}
Can someone tell me why the > did not work? This is my first time using the
The span elements were a little harder, since there are two of them. I tried
the following for the first span:
td.PoemRating span:first-child{}
This did not work, so I am going to guess that it is because the span is not
the first child, only the first child that is a span. Is there a way to take
care of the span elements (without giving them a class attribute, if this is
the only way, I can accept that)? Thank you for any help that anyone can
provide.
not know of any CSS newsgroups. I have a page with many areas that are
composed of the following elements in the following layout:
<td class="mystyle">
<a></a>
<span></span>
<img/>
<span></span>
</td>
For the td element, I obviously used the following selector:
..mystyle{}
For the a and img elements, I would have thought I would use
td.mystyle>a{}
td.mystyle>img{}
Since the a and img elements are immediate children of the td element, but
this did not seem to work, but the following did:
td.mystyle a{}
td.mystyle img{}
Can someone tell me why the > did not work? This is my first time using the
> technique in CSS, so maybe I am doing something wrong.
The span elements were a little harder, since there are two of them. I tried
the following for the first span:
td.PoemRating span:first-child{}
This did not work, so I am going to guess that it is because the span is not
the first child, only the first child that is a span. Is there a way to take
care of the span elements (without giving them a class attribute, if this is
the only way, I can accept that)? Thank you for any help that anyone can
provide.