1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

A:Link with an asp.HyperLink control

Discussion in 'CSS' started by +:::Spider25:::+, May 16, 2006.

  1. #1
    <div class="WhiteLink"><asp:HyperLink id="homeLink" runat="server" >&nbsp;HOME&nbsp;</asp:HyperLink></div>

    ---------------------
    This was my div...

    .WhiteLink a:link{color:#FFFFFF}
    .WhiteLink a:visited{color:#FFFFFF}
    .WhiteLink a:active{color:#FFFFFF}
    .WhiteLink a:hover{color:#FFFFFF; text-decoration:underline}
    -----------------------------

    This was my css...
    I do not know how to do the asp:HyperLink change its color when I am "hover" it?
    Some Ideas?

    Thanks a lot
     
    +:::Spider25:::+, May 16, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    
    .WhiteLink a:link{color:#FFFFFF}
    .WhiteLink a:visited{color:#FFFFFF}
    .WhiteLink a:hover{color:#ffa; text-decoration:underline}
    .WhiteLink a:active{color:#FFFFFF}
    Code (markup):
    Note the order of the selectors: link, visited, hover and active.

    cheers,

    gary
     
    kk5st, May 16, 2006 IP
  3. +:::Spider25:::+

    +:::Spider25:::+ Peon

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It does not make a difference , I think is because there is no <a> tag, instead there is an <asp:Hyperlink>...
     
    +:::Spider25:::+, May 17, 2006 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    In the output the browser sees? Is your script not being parsed by the server? The output of any server side script should be valid html. Or, I guess IE and IE alone will work with it as a client side script, like javascript.

    If the latter is the case, junk it.

    cheers,

    gary
     
    kk5st, May 18, 2006 IP
  5. fhirzall

    fhirzall Guest

    Messages:
    124
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi Spyder, a hyperlink control is compiled into a normal a href when it goes in a browser, but for the hyperlink control, theres a property called CssClass, so your code would be <asp:HyperLink id="homelink" CssClass="whitelink" runat="server">
     
    fhirzall, May 19, 2006 IP