asp:LinkButton and CssClass

A

Alex

I have an asp linkbutton declared as follows:
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="tt">ASP Link
Button</asp:LinkButton>

My CSS classes are declared as follows:
a.tt
{
color:Black;
text-decoration: none;
border-bottom: 1px dashed Blue;
}
a.tt:visited {
color: Black;
}

a.tt:hover
{
background:#F0F8FF;
color:Black;
cursor:help;
}

But when I run the page, none of the a.tt styles are being displayed. The
strange thing is, when I add a regular html <a> control on the page, it works
fine.
 
D

David Wier

that's odd - I just created a page with just the link button, copied from
your code below, and added a stylesheet with your css code - -
It seemed to work just fine - - at least the main class - - since I have no
code for it to go anywhere, I can't verify the 'visited' css


David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
http://cg.augustwind.com - ControlGrouper (new ASP.Net control) - control
multiple controls at one time.
 
A

Alex

You're right. The code would have worked. I took a look at my aspx code and I
noticed I didn't have a close ">" in the DOCTYPE declaration. It's all good
now.

This is so strange. It's a very big page, with tabs and grids and every
control you can think of, and the only one that didn't work was the link
button....
 

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,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top