Setting a class selector

Newsgator Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


Setting a class selector Expand / Collapse
Author
Message
Posted 12/14/2008 1:54:52 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/16/2008 3:38:33 PM
Posts: 39, Visits: 57

I have code like this in my category pages:http://www.vintagetextile.com/edwardian.htm

<tr class="row2"&glt;<td&glt;</td&glt;
<td&glt;<a href="new_page_734.htm"&glt;<img src="images/Thumbnails/4066thumb2.jpg" alt="Irish lace blouse" width="209" height="325"&glt;</a&glt;</td&glt;
<td class="details"&glt;
<p&glt; <b&glt;#4066 $750</b&glt;</p&glt;
<p&glt;<a href="new_page_734.htm"&glt;Irish crochet lace blouse, c.1900.</a&glt; The all-over pattern of small roses is accentuated around the neckline and collar with large motifs. The blouse closes in back with snaps. The crochet ball buttons
are decorative only. The three-dimensional raised work characteristic of Irish crochet is amazing. <span class="bi"&glt;Wearable, washable, and beautiful</span&glt;! NEW LISTING </p&glt;</td&glt;</tr&glt;

I want the link around "Irish crochet lace blouse..." to be styles with a declaration block like this:
:link{color:#00f;background-color:#fff;text-decoration:underline}

It would be easy enough to do this by assigning a special class applied to each such anchor link, but that is so laborious and prone to error.

What I want is the correct selector for my style sheet, a selector that will automatically apply the declaration to anchor links inside rows of class "row2", which contains a <td&glt; of class "details", which contains an anchor link.

I have tried various combinations for the selector, like

a.row2.details.p:link{color:#00f;background-color:#fff;text-decoration:underline}

but have been unable to get anything to work.

Any ideas for the right selector?
Thanks, CMA
Post #44918
Posted 12/15/2008 3:07:41 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 3/1/2009 4:36:25 AM
Posts: 86, Visits: 524
Hi,

Does this demonstrate the method?

tr.row2 p a {
 color:#0f0;
 font-weight:bold;
}
tr.row2 p a:hover {
 color:#999;
}

Louise

Post #44932
Posted 12/15/2008 6:02:48 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/16/2008 3:38:33 PM
Posts: 39, Visits: 57
Louise, you nailed it perfectly!
I have not met anyone who knows CSS as well as you do.
Jon
Post #44936
Posted 12/16/2008 12:53:46 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 3/1/2009 4:36:25 AM
Posts: 86, Visits: 524
Hi Jon,

Shucks!  But put it all down to the CSS Reference and Top Style.  How anybody would try production level CSS without Top Style is beyond me.

Enjoy the Season.

best

Louise

Post #44937
Posted 12/16/2008 7:52:45 AM
Forum Member

Forum Member

Group: Forum Members
Last Login: 12/16/2008 3:38:33 PM
Posts: 39, Visits: 57
Hi Louise:
" CSS Reference and Top Style". Is "CSS Reference" something in Topstyle? I have been using Eric Meyer's "CSS: the definitive guide".
Post #44939
Posted 12/16/2008 3:00:00 PM
Forum Member

Forum Member

Group: Forum Members
Last Login: 3/1/2009 4:36:25 AM
Posts: 86, Visits: 524
Morning Jon,

Eric Meyer is of course a guru and that book is highly recommended as are others by him.

But I just used the actual CSS specification, http://www.w3.org/TR/CSS21/ and learnt by pumping demos into Top Style.  All our people are trained the same way.

For example, the matter you were examining is detailed at 5.5 Descendant Selectors in the above web page.

Not all browsers are compliant with the CSS Reference. Top Style's facility for testing across a range of browsers is valuable here.

In my early days I was helped a lot also by the TS Community. There was always somebody to help and explain (including Nick)  This is the reason that I respond to requests and provide what help I can.  One of my hopes is that when Stefan gets it all going, the TS Community will be rebuilt through his News Group.

Anyway you and I have been talking over a number of years (and I am partial to looking at you fashion displays .. keep waiting for the Clearance Sale)

best
Louise

Post #44949
« Prev Topic | Next Topic »

All times are GMT -7:00, Time now is 1:58am

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.063. 7 queries. Compression Disabled.

NewsGator.com | Support | Developers | Partners | Press | Company
© Copyright 2003-2009  NewsGator Technologies, Inc. All Rights Reserved.
Copyright Information | Privacy Policy | Terms of Service
Microsoft Gold Certified Partner