Results 1 to 4 of 4

Thread: [RESOLVED] [2005] can this be achieved in CSS?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Resolved [RESOLVED] [2005] can this be achieved in CSS?

    I have a few labels that I would like to add these attributes to... They are being placed in an AJAX accordion so I want them to appear as links when someone mousesover them.

    I am thinking there is a better way to do this in CSS but not sure how.

    Code:
            lblRep1.Attributes.Add("onmouseover", "document.getElementById('" & lblRep1.ClientID & "').style.color = 'red';document.body.style.cursor='pointer'")
            lblRep1.Attributes.Add("onmouseout", "document.getElementById('" & lblRep1.ClientID & "').style.color = 'black';document.body.style.cursor='default'")

  2. #2
    Fanatic Member
    Join Date
    Jun 2004
    Location
    All useless places
    Posts
    917

    Re: [2005] can this be achieved in CSS?

    Just create a class in your stylesheet. Something like
    Code:
    .myStyle {background-color: red;}
    .myStyle:hover{background-color: blue;}
    And you'll have to set the class property to "myStyle" in the html where label has been declared.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: [RESOLVED] [2005] can this be achieved in CSS?

    You must spread some Reputation around before giving it to rjv_rnjn again.


    Thanks alot!

  4. #4
    Fanatic Member
    Join Date
    Jun 2004
    Location
    All useless places
    Posts
    917

    Re: [RESOLVED] [2005] can this be achieved in CSS?

    Quote Originally Posted by Besoup
    You must spread some Reputation around before giving it to rjv_rnjn again.
    I smell some conspiracy here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width