SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Link changes size after clicked

    I have a link that is smaller than the other links. When the link is clicked, it becomes the size of the other links. How do I fix it?

    Here is the html

    <a href="link.html" class="small">link</a>

    Here is the CSS

    a.small { font-family: Arial, Verdana, sans-serif; font-size: 10pt; margin-left: 10px; }

    Am I using the wrong function for this?

  2. #2
    ********* Celica Lover Coomer's Avatar
    Join Date
    Apr 2002
    Location
    Not worth the drive
    Posts
    474
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using this:

    a.small:link {font-family: Arial, Verdana, sans-serif; font-size: 10pt; margin-left: 10px;}
    a.small:visited {font-family: Arial, Verdana, sans-serif; font-size: 10pt; margin-left: 10px;}
    a.small:active {font-family: Arial, Verdana, sans-serif; font-size: 10pt; margin-left: 10px;}
    + Celica =
    6G Celicas :: My '94-99 Toyota Celica resource

  3. #3
    SitePoint Addict
    Join Date
    Jul 2001
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your current coding looks ok.
    i dont think it should matter, but try this...

    .small a {font-family: Arial, Verdana, sans-serif; font-size: 10pt; margin-left: 10px;}

  4. #4
    Put your best practices away. The New Guy's Avatar
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    2,087
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Its is because you did not define a A:visited. It will use the default one. Coomer code should do the trick.
    "A nerd who gets contacts
    and a trendy hair cut is still a nerd"

    - Stephen Colbert on Apple Users

  5. #5
    SitePoint Addict
    Join Date
    Jul 2001
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by The New Guy
    Its is because you did not define a A:visited. It will use the default one.
    the "a" should be applied to all link elements though (at least in theory).
    i will agree though, if all else fails, declare the full array of link values for the class.


Bookmarks

Posting Permissions

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