SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Sep 2004
    Location
    Boston
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS -- how do I get no style at all.

    I have some links in my webpage and I don't want them to have any color or text-decoration at all. Basically I want the browser to make the word a link, but that is all. I don't want it to fool with anything else in the display. How do I do this?

    I know that I can set style="text-decoration:none" but I can't set color=none. I don't want to actively set the color to black because I am not sure that the text would normally have been black. Basically, the text could be any color and I want the link to leave the text color alone.

    Please help me. Thanks.

  2. #2
    SitePoint Addict jodmcc's Avatar
    Join Date
    Dec 2003
    Location
    Houston, Texas
    Posts
    227
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could set a psuedo-class tag for whatever the colors used are going to be.

  3. #3
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    a { color: inherit; }
    Should do the trick.

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,809
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Although blufives answer is correct unfortunately IE (and some versions of opera) do not correctly implement this. Mozilla is fine with it though .

    Your only real option is to color each link specifically (assuming that your layout allows this).

    Paul

  5. #5
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Although blufives answer is correct unfortunately IE (and some versions of opera) do not correctly implement this. Mozilla is fine with it though .
    Knew I should have tested a bit more widely. Curses be upon IE for being useless. Opera seems to be fine from version 7 onwards, at least, which is the vast majority of opera users as far as I can tell.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,809
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by blufive
    Curses be upon IE for being useless
    Yes its only IE that gives css a bad name


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
  •