#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Lithuania
    Posts
    192
    Rep Power
    14

    CSS one more time...


    Sometimes I just don't get how CSS works, check this out:
    Code:
    --- main.CSS ---
    A.bold:link { font-family: verdana; font-size: 10pt; color: #cccccc }
    A.bold:hover { font-family: verdana; font-size: 10pt; color: #cccccc }
    Code:
    --- page.php ---
    <font face="Verdana" size="2" color="#fffff0">Some text, etc. <a class="bold" href="mailto:email@email.com">Name</a>. All 
            Rights Reserved.<br>
            <a class="bold" href="http://some.site.com">some.site.com</a> | <a class="bold" href="javascript:Start1('info.php')">Site Information</a>
            <br>
             </font>

    When I look at index.php I see soemthing like this:

    Some text, etc. Name. All Rights Reserved.
    some.site.com | Site Information

    The first line is ok, just as it should be, but the second line's links are showing up already underlined, but they should be just as the first line, I don't see the logic here, I've tried many many other ways, I closed <font> tags before <a> tags etc., nothing helped...please tell me how this works because I already had similar problems with this...
  2. #2
  3. No Profile Picture
    Beelzebub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    The nether regions...ok, San Diego
    Posts
    164
    Rep Power
    13
    Frankly, I don't see how its working on any line.
    Try...
    a {font-family: verdana; font-size: 10pt; color: #cccccc}
    a:hover{font-family: verdana; font-size: 10pt; color: #cccccc}

    Or, if you must...
    a.bold {font-family: verdana; font-size: 10pt; color: #cccccc}
    a:hover.bold{font-family: verdana; font-size: 10pt; color: #cccccc}

    Also, links will be underlined unless you specify otherwise, such as...
    a {text-decoration: none}
    a:hover {text-decoration: underline}
  4. #3
  5. No Profile Picture
    aHVoPw==
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2001
    Posts
    1,058
    Rep Power
    15
    all <a href=""></a> links are underlined automatically. that's where CSS comes in to remove them.

    add text-decoration: none in your lines

    for example:
    A.bold:link { font-family: verdana; font-size: 10pt; color: #cccccc; text-decoration: none }
    Visit my new IIS Tutorial Series!
  6. #4
  7. No Profile Picture
    aHVoPw==
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2001
    Posts
    1,058
    Rep Power
    15
    darn, someone beat me to it
    Visit my new IIS Tutorial Series!
  8. #5
  9. No Profile Picture
    Beelzebub
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    The nether regions...ok, San Diego
    Posts
    164
    Rep Power
    13
    Right, K1...just remember the logic is...

    a:hover (pseudo-class) .bold (class), although just .bold is enough, unless you want to reuse the .bold class with different rules, inheriting the earlier setting.

IMN logo majestic logo threadwatch logo seochat tools logo