Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change link color in Datagrid

Status
Not open for further replies.

sirjon

Instructor
Jun 6, 2002
135
TH
Hi,

I have my grid with item background = a light colour and
alternate item background = a dark colour.
Font colors are reversed.

This is fine but when the text becomes a link, the color changes to my link color.

How can I overide my link color?

Thanks
JB
 
WHat you need to do is create a style such as the following:

Code:
.dg_item A{
  color: black;
}

You assign dg_item as the cssclass of the column. Because the A tag is after the class name it tells it to apply it to A tags that are held within an html block that has that css class set.

James :)

James Culshaw
james@miniaturereview.co.uk
 
Nice one James, I never knew that - Thanks!
Is it possible to put the other (none A items) within the cssclass?

So I have

<AlternatingItemStyle Cssclass="dg_item">

This takes care of the hyperlink, but can I put the backcolor for instance within this CssClass?
or must I just declare that within the <alternatingitemstyle> tag


Thanks
JB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top