dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: CSS text coloring

  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Question CSS text coloring

    I did up a new layout for a friend and used a CSS style sheet for the links and scrollbar colors (to make it easy on her or me...whoever makes any changes LOL). It all looks great in IE, however in Netscape (I have v6.2), K-Meleon and Mozilla the A:link code is set to white, but in those browsers, it shows up the default blue, which clashes horribly with the background color used on the site.

    The code within the STYLE tags is:
    A:link
    { text-decoration: none; color:#FFFFFF}

    A:visited
    { text-decoration: none; color:#B4B4B4}
    A:active
    { text-decoration: none; color:#B4B4B4}
    A:hover
    { FONT-WEIGHT: bold; text-decoration: none; color:#BBD5FB; }

    The bit in bold is what's giving me fits. I even tried using the word "white" and still no change.

    If you'd like to look at the page it is http://www.geocities.com/jenng28

    I've looked for a solution to no avail...can anyone please help me? Thanks in advance.

  2. #2
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Looks fine. It must be something else in your CSS, but the link you posted gives me a 404.

    Also, here's a few things to keep in mind:

    1. The order is wrong. You should specify it in this order:

    a:link, a:visited, a:hover, a:active

    2. Changing the font's weight (to bold) on hover will often have very negative side effects, such as the text on the page moving around when someone hovers over a link. Not good.

  3. #3
    Join Date
    Jan 2004
    Posts
    3
    Hmm, I changed the order, but the links still aren't coming up white...while everything else works fine.

    Sorry, url should be http://www.geocities.com/jennj28/

    The filename for the css file is sdreams.css

  4. #4
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Ah, I see the problem. Remove this from the top and bottom of the file:

    <STYLE TYPE="text/css">

    <!--

    and

    -->
    </STYLE>

    With external files, you can not include the <style> (or any other) HTML tags (including the <!--). A comment in CSS is /*comment*/

  5. #5
    Join Date
    Jan 2004
    Posts
    3
    Fantastic, thanks muchly. Always seems to be the simple things that get me hung up.

  6. #6
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Happy to help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles