Results 1 to 3 of 3

Thread: CSS & <a href>

  1. #1

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609

    CSS & <a href>

    how in css can you define the styles for two different <a href> tags ?

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Use classes. Something like this in the CSS:

    Code:
    a.lala {
      background:transparent;
      color:white
    }
    a.dipsy {
      background:transparent;
      color:black
    }
    then use the class attribute in the HTML file:

    Code:
    <a href="#" class="lala">lala</a>
    <a class="dipsy" href=#">dipsy</a>

    You can also add hover, link etc to the css classes:

    Code:
    a.lala:link {
      background:transparent;
      color:white
    }
    a.lala:hover {
      background:transparent;
      color:black
    }

  3. #3

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    a.lala:link {
    background:transparent;
    color:white
    }
    a.lala:hover {
    background:transparent;
    color:black
    }
    aaaaaaaaaah, thats what i was looking for. thanx

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