how to assign a css class to datagrid header that is a link?

D

djc

I have a datagrid that has several sortable columns. So the headers become
hyperlinks. I need to be able to assign a css class to just these
hyperlinks? how can I do that? For example, right now I can just assign css
styles to the A tag which does control them but that also controls ALL the
other links on the page, which I don't want.

is there a way? (other than assigning other classes to all the *other*
hyperlinks on the page ... which *is* my plan B)

any input is appreciated. Thanks.
 
J

Jos

djc said:
I have a datagrid that has several sortable columns. So the headers
become hyperlinks. I need to be able to assign a css class to just
these hyperlinks? how can I do that? For example, right now I can
just assign css styles to the A tag which does control them but that
also controls ALL the other links on the page, which I don't want.

is there a way? (other than assigning other classes to all the *other*
hyperlinks on the page ... which *is* my plan B)

any input is appreciated. Thanks.

Set the CssClass property, and use a class (let's call it "header") like
this:

..header { color:blue; } // style of header itself goes here
..header A { color:red; etc; etc; } // style of link goes here
 
D

djc

you just made my day Jos! I thought it was something that would wind up
being handled completely within css and not an aspnet thing. I read a book
on CSS some time ago but I just couldn't remember that syntax. (i don't use
it often only because programming/webdesign is not actually my job... more a
hobby) I need to review that book man. Thank you!
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top