SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry This is making me nutty.

    I still have rectangular borders around my navigational gifs (which are circular). They take the attributes of my links. That is, they change colors in the way my links are *supposed* o.

    And speaking of links changing colors:

    for the love of G_d and all things holy, can someone tell me WHY my links are not the color I program them to be?

    The code format works on ONE stylesheet, but not on another. Same code. Same EXACT code (same site, too).

    The links, when browser is refreshed, are all bright blue with the underscore underneath them. Also, the navigational gifs' rectangles are also this color until used.

    Is it because I'm using IE6 and HTML4/css?

    Is it because I have 2 stylesheets in my site (each linked to a different page)?

    Is it because I'm on a deadline and can't afford this kind of foolishness?

    Here's the code:

    a:link {
    color: #9966cc;
    font-family: papyrus; arial; serif;
    font-size: 12pt;
    text-decoration: none;
    }

    a:visited {
    color: #9966cc;
    font-family: papyrus; arial; serif;
    font-size: 12pt;
    text-decoration: none;
    }

    a:active {
    color: #9966cc;
    font-family: papyrus; arial; serif;
    font-size: 12pt;
    text-decoration: none;
    }

    Thanks, once again.

  2. #2
    pg for mild peril cow's Avatar
    Join Date
    Mar 2000
    Location
    nevada, usa
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    make sure you specify border="0" in each <img>
    "There's no justice like angry mob justice!" --Seymour Skinner

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please post a link to, or the source of, the HTML document (yes, the entire thing) that you're using. In the meantime, try this:
    Code:
    a:link {
      background-color: transparent;
      color: #9966cc;
      font-family: papyrus, arial, sans-serif;
      font-size: 12pt;
      text-decoration: none;
    }
    
    a:visited {
      background-color: transparent;
      color: #9966cc;
      font-family: papyrus, arial, sans-serif;
      font-size: 12pt;
      text-decoration: none;
    }
    
    a:active {
      background-color: transparent;
      color: #9966cc;
      font-family: papyrus, arial, sans-serif;
      font-size: 12pt;
      text-decoration: none;
    }
    
    img {
      border: 0;
    }

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink Thanks.

    I'll try this code and post the rest of the code if it doesn't work (I'm not hosted yet).

    Can you tell me if I can set one of these borders to a color by using the css code border-color: #[xxxxxx]; ?

    Thanks.

  5. #5
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Thanks.

    Originally posted by Saoirse
    Can you tell me if I can set one of these borders to a color by using the css code border-color: #[xxxxxx]; ?
    You could do that, but I prefer the shorthand notation of it myself.
    Code:
    img {
      border: 2px solid black;
    }
    2px is the width of the line, solid is the border's style, and black is the border's color.

  6. #6
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink Thanks, MJ

    Everything has worked just as I wanted it to.

    I am still trying to make my clickable map work, though, and trying to find htimage for free (or an equivalent).

    Any thoughts?

  7. #7
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow Wait. I spoke too soon.

    Still having problems with the text decoration/link color on one stylesheet (I swear -- the code you gave me works on ONE stylesheet, but not on the other; just like before).

    Ugh.


  8. #8
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Post the contents of that style sheet and also what code you used to include it into your HTML document. Also, have you got any STYLE blocks in the HTML document itself? Because those will always override any external sheets.

  9. #9
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Here is my code. Thank you.

    Hi, Matt. Thanks for trying to give this a go. Here is a sample of my link html:

    <ul>
    <li>Mad Scientist (<a href="http://www.madsci.org/">www.madsci.org</a>).<br>
    This is a fabulous site for kids, teachers and anyone curious about science any science topic at all. There is a random fact generator, a huge, searchable database, and a place to ask questions of real scientists, who respond to any age scientist in age-appropriate ways.<br>
    </li>
    </ul>

    Here is a sample of my css:

    a:link {
    background-color: transparent;
    color: #9966cc;
    font-family: papyrus; arial; sans-serif;
    font-size: 12pt;
    text-decoration: none;
    }

    a:visited {
    background-color: transparent;
    color: #9966cc;
    font-family: papyrus; arial; sans-serif;
    font-size: 12pt;
    text-decoration: none;
    }

    a:active {
    background-color: transparent;
    color: #cc99ff;
    font-family: papyrus; arial; sans-serif;
    font-size: 12pt;
    text-decoration: none;
    }

    No -- no duplicate css in my html doc. As you can see, I tried to use your prior suggestion. Now, I'm wondering if the "active" attribute has been deprecated altogether. The more I look at other people's code, the more I don't see it.

    Thanks, again.

  10. #10
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Go here and view the source. It works like I think you want it to work, so try to figure out what you're doing wrong. If you can't figure it out, just send me your files via E-mail and I'll take a look at them.

  11. #11
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink

    So, I take it the page works, then?

  12. #12
    long gone but not forgotten AljapaCo's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, have you created a style for the <ul> ???

    ul , ol {
    background-color: transparent;
    color: #000000;
    font-family: papyrus; arial; sans-serif;
    font-size: 10pt;
    text-decoration: none;
    }

    This could override the a style...

    And why do you use three sets that are identical for the links??

    It would be the same with

    a:link , a:visited , a:active {
    background-color: transparent;
    color: #9966cc;
    font-family: papyrus; arial; sans-serif;
    font-size: 12pt;
    text-decoration: none;
    }
    T O B I A S - S T R A N D H | visit my site here
    OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
    god doesn't create genius, he clones me.............

  13. #13
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Here is my code. Thank you.

    Originally posted by Saoirse
    font-family: papyrus; arial; sans-serif;
    First off, you're supposed to use commas to separate fonts, not semi-colons. :-)

    Anyway, not knowing your precise situation, you can really compress the code and probably get it to work better. The code you have now is much more complicated than it needs to be I think:
    Code:
    A {
      background: transparent;
      color: #96c;
      font: 1em Papyrus, Arial, sans-serif;
      text-decoration: none;
      border: 0px;
    }
    
    A:ACTIVE {
     background: transparent;
     color: #c9f;
    }
    And that's about all there is to it, I think. Also, the ACTIVE pseudo-class isn't depreciated or going anywhere for a long while -- it's still safe to use. If that's still not working for you, I'm putting my money on the HTML code (or a browser bug, but I haven't heard of one quite like this). :-)

    ~~Hope This Helps

  14. #14
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Re: Here is my code. Thank you.

    Originally posted by Ian Glass
    Also, the ACTIVE pseudo-class isn't depreciated
    It's deprecated, you simpleton!

  15. #15
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink Thanks, everyone.

    I appreciate all of the suggestions. I've been working on another project this past week, so I'm only just now (4/21) getting back to this issue. I will try setting the background of my links to transparent and see what happens. I'm sure it will be just fine soon.

    Many thanks, again.

  16. #16
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Nope. Nothing works.

    Errr . . .

    And mind you, my code (which is exactly the same as that in my css) for my first page does work -- I don't have this problem with any of the links on that one page. Just the ones to which my css is linked.

    Errr . . .

  17. #17
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please post the contents of the entire page that doesn't work and also any style sheets or JavaScript files that you're linking to.

  18. #18
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make sure that the <link> is pointing to the right place (a simple yet all too common error :-) and make sure there aren't any other styles that override the CSS link your talking about. :-)

    ~~Ian

  19. #19
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks Matt; thanks, Ian.

    I tend to think the link from the style sheet is working; all the other attributes like background color and font style are there.

    I have check to make sure that the code isn't repeated or contradicted so that it overrides and defaults.

    Here is the css (again; please note that I tried making the links' backgrounds transparent; it didn't work):

    a:link {
    color: #9966cc;
    font-family: papyrus, arial, sans-serif;
    font-size: 14pt;
    text-decoration: none;
    }

    a:visited {
    color: #9966cc;
    font-family: papyrus, arial, sans-serif;
    font-size: 14pt;
    text-decoration: none;
    }

    a:active {
    color: #cc99ff;
    font-family: papyrus, arial, sans-serif;
    font-size: 14pt;
    text-decoration: none;
    }

    body {
    margin: 15px 15px 15px 15px;
    padding: 5px 5px 5px 5px;
    background-color: #663399;
    font-family: papyrus, arial, sans-serif;
    color: #cc99ff;
    font-size: 14pt;
    }

    Here is the HTML:

    <ul>
    <li>Mad Scientist (<a href="http://www.madsci.org/">www.madsci.org</a>).<br>
    This is a fabulous site for kids, teachers and anyone curious about science any science topic at all. There is a random fact generator, a huge, searchable database, and a place to ask questions of real scientists, who respond to any age scientist in age-appropriate ways.<br>
    </li>
    </ul>

    Thanks for your persistance.

  20. #20
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is good code, condensed and ready to use.
    Code:
    a:link {
      background: transparent;
      color: #96c;
      text-decoration: none;
    }
    
    a:visited {
      background: transparent;
      color: #96c;
      text-decoration: none;
    }
    
    a:active {
      background: transparent;
      color: #c9f;
      text-decoration: none;
    }
    
    body {
      background: #639;
      color: #c9f;
      font: 14pt papyrus, arial, sans-serif;
      margin: 15px;
      padding: 5px;  
    }
    However, I really can't help you until I see your entire page's HTML. Link?

  21. #21
    long gone but not forgotten AljapaCo's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You are really squeezing the code Matt

    BTW. I second Matt, show us the site, show us the site
    T O B I A S - S T R A N D H | visit my site here
    OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
    god doesn't create genius, he clones me.............

  22. #22
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I'm not hosted yet!

    Sorry. Otherwise I would post the link.

    I'll try Matt's very efficient code -- on all my pages -- and see what happens.

    BTW: I'm building another site which has its own style sheet and I'm using, essentially, the same code for the links AND THE PROBLEM DOESN'T OCCUR THERE. Ugh. Which makes me think that SOMEWHERE I've got contradictory code in this website. I'll comb through it once more.

    Thanks, again and again.

  23. #23
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy I give up.

    But thank you all for hanging in there with me. Matt's latest attempt didn't do anything except make me determined to learn to write more efficient code.

    The links appear as they are coded to appear once they are used; I guess I'll have to settle for that. The bright blue, underscored form in which they first appear is just really hard on the eyes, given the background color of the page.

    Thanks again.

  24. #24
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Don't give up yet! Sounds like you may have some inheritance problems or a small typo somewhere in your code.

    ...jumps on Matt's bandwagon...

    Post your html & css in its entirety, I'm sure someone will figure it out for you.

  25. #25
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's no excuse for not signing up for a free host. I mean, they're free, right?


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
  •