#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2001
    Posts
    910
    Rep Power
    0

    Problem with CSS and Links


    I am using the below styles for my links. The problem is that the top link style is automatically assigned to the bottom, such as the width, and I do not want this, how can I stop this.

    Thanks

    Tim



    a:link {color: black; font-family: tahoma; font-size: 10pt; border: 1px

    solid 000000; width: 150; background-color: orange; text-decoration: none}
    a:visited {color: black; font-family: tahoma; font-size: 10pt; border:

    1px solid 000000; width: 150}
    a:active {color: black; font-family: tahoma; font-size: 10pt; border: 1px

    solid 000000; width: 150}
    a:hover {color: black; font-family: tahoma; font-size: 10pt; border: 1px

    solid 000000; width: 150; background-color: yellow}


    a.side:link {font-size: 10pt; color: black; font-family: tahoma;

    text-decoration: none; background-color: #0080FF; width: 100}
    a.side:hover {font-size: 10pt; color: black; font-family: tahoma;

    text-decoration: none; background-color: yellow}
    a.side:visited {font-size: 10pt; color: black; font-family: tahoma;

    text-decoration: none}
    a.side:active {font-size: 10pt; color: black; font-family: tahoma;

    text-decoration: none}
  2. #2
  3. Throws Rocks
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio
    Posts
    392
    Rep Power
    14

    Placement


    Put your class-less link styles last. This means the link styles of class 'side' should come before the regular link styles in the file. Also, anytime you post syntax, please use the code option provided with vB. It's the # button found right next to the PHP button above the text field.
    Two things have come out of Berkeley, Unix and LSD.
    It is uncertain which caused the other.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2001
    Posts
    910
    Rep Power
    0

    Links Stil dont work


    I tried that but it did not work. I am using the following code on one page and it works, I altered it for this page and it does not work, why.

    a:link {color: black; text-decoration: none; font-family: tahoma; font-size: 12pt; width:100}
    a:hover {color: black; text-decoration: none; font-family: tahoma; font-size: 12pt; background-color: white; width:100}
    a:visited {color: black; text-decoration: none; font-family: tahoma; font-size: 12pt;}
    a:active {color: black; text-decoration: none; font-family: tahoma; font-size: 12pt; background-color: white}
    a.small:link {color: white; text-decoration: none; font-family: tahoma; font-size: 8pt; background-color: red}
    a.small:visited {color: white; text-decoration: none; font-family: tahoma; font-size: 8pt}
    a.small:active {color: white; text-decoration: none; font-family: tahoma; font-size: 8pt}
    a.small:hover {color: black; text-decoration: none; font-family: tahoma; font-size: 8pt; background-color: red}
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2001
    Posts
    910
    Rep Power
    0
    Ok got it fixed thanks

    Tim

IMN logo majestic logo threadwatch logo seochat tools logo