Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: a:link not correctly shown

  1. #1
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default a:link not correctly shown

    I am using this code in my main CSS

    a:link {color: #AA0000;TEXT-DECORATION: none}
    a:visited {color: #660000;TEXT-DECORATION: none}
    a:hover {color: #FFFFFF;TEXT-DECORATION: none}
    a:active {color: #666666;TEXT-DECORATION: none}
    img {vertical-align: middle;text-align: center;border: none;}

    and for some reason, the anchors wants to be blue and underlined, and the pictueres have a blue border also... any hellp apperciated,
    From your freind,
    Ryan "Boxxertrumps" Trumpa
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Hmm... I don't know CSS that well.
    It looks fine to me.
    I'd add semicolons at the end of the first 3 lines, spaces after the semicolons in other places and make the TEXT-DECORATION lowercase. I don't think any other these really affect performance, but it's good to be consistant/standard.

    Also, you should do:
    thing {
    property: value;
    another: etc;
    }

    so you have multiple lines... easier to organize.



    text-align is invalid for images, I think. Just align should be good there.

    Since you aren't using classes, then it shouldn't be the rest of your page's coding that's hurting it.... not sure.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Code:
    a:link {color: #710000}
    a:visited {color: #BB0000}
    a:active {color: #FF9393}
    a:hover {color: #FF6666}
    that's right from my site^^

    for the pictures with the borders, i have images as link on my site, and you need to define " border="0" " at the end of the IMG tag, that'll take care of the border, just a side note, its a good idea to have links underlined because that's what people are used to seeing, and they might miss it unless it's really obvious that its a link. djr33 is right about the multi-lin thing, but it needs to be:

    thing {
    property: value;
    another: etc
    }

    only difference: no semi-colon on the last property, because technically the close brace is on the end of that last prperty (another: etc} )

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    "technically the close brace is the end of the last property"
    No... since it's the last property, leaving the semicolon off is allowed... but technically should be there.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    guess i shouldn't talk i just learned CSS from W3 they say to leave it off, they're the bosses so i went with it, lol, havn't tried it with the semi-colon

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, neither way is wrong. They should both work.
    CSS, like Javascript, is a loose language that will allow imperfect syntax.
    In fact, I'm not sure which is correct. I should look that up. I'm basing this off my other knowledge and what I've heard.

    In a language like PHP that MUST have the right syntax, the semi-colons are always there. JS/CSS are a bit kinder, but this can also lead to problems. If your use of semicolons is inconsistant or abnormal, a simple error can be overlooked or hard to find.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    as i said W3 told me that, i seem to have better compatability in browsers other then IE when i listen to them thats all, plus u save the difficult task of pressing the semi-colon key

    *strains*............ ;

    lmao

  8. #8
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    I think you w3schools.com not the W3. There is a huge difference

  9. #9
    Join Date
    Oct 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    would you mind sharing what that difference is? lol just joined and browsing.

  10. #10
    Join Date
    Oct 2006
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    w3.org is like the company website, w3schools.com is, well the school, it's loaded with tutorials, how tos, very useful resource......and yes i was refering to w3schools when i said w3

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
  •