rollover effect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • domeceo

    rollover effect


    I'm currently in the process of replacing a few rollover images, use
    for anchors, with text. I know how to change the hover and link colo
    attribute for all <a> hyperlink tags, but I don't want to change the
    all. How can I set hover and link attributes for a class

    domece
    -----------------------------------------------------------------------
    Posted via http://www.forum4designers.co
    -----------------------------------------------------------------------
    View this thread: http://www.forum4designers.com/message44657.htm

  • Lee K. Seitz

    #2
    Re: rollover effect

    In article <domeceo.11j34o @mail.forum4des igners.com>,
    domeceo <domeceo.11j34o @mail.forum4des igners.com> wrote:[color=blue]
    >
    >I'm currently in the process of replacing a few rollover images, used
    >for anchors, with text. I know how to change the hover and link color
    >attribute for all <a> hyperlink tags, but I don't want to change them
    >all. How can I set hover and link attributes for a class?[/color]

    a.class:hover { property: attribute; }

    If there's several anchor tags together that you want to replace (like
    a menu), you can include them in a single div and set the attributes
    like that.

    For example (from a current project of mine):

    ..nav a {
    padding: 2px 10px;
    color: #f00;
    background-color: #ff0;
    font-family: Arial, Verdana, sans-serif;
    font-weight: bold;
    text-decoration: none;
    }

    ..nav a:visited
    {
    color: #f00;
    }

    ..nav a:hover, .nav ul li a:active
    {
    color: #ff0;
    background-color: #f00;
    }


    Then the HTML is something like:

    <div class="nav">
    <a href="one.html" >First</a>
    <a href="two.html" >Second</a>
    <a href="three.htm l">Third</a>
    </div>

    --
    lkseitz (Lee K. Seitz) .at. hiwaay @dot@ net
    "From there to here, and here to there, funny things are everywhere."
    -- Dr. Seuss, _One Fish, Two Fish, Red Fish, Blue Fish_

    Comment

    Working...