Link visibility and Safari CSS

Discussion in 'Web Design and Development' started by nelly22, Dec 12, 2013.

  1. nelly22 macrumors 6502

    Joined:
    Sep 29, 2009
    #1
    Links in some webpages look exactly same than normal text and are hard to find. Also visited link color is same than non-visited links.

    In Safari preferences Advanced tab user can choose own CSS.

    What CSS code i should put to my CSS to fix these 2 problems?

    Thanks
     
  2. Dunmail macrumors regular

    Joined:
    Mar 27, 2009
    Location:
    Skipton, UK
    #2
    Obviously it depends on what the background colour of the site is but something along the lines of:

    Code:
    a {
      color : #22c;
    }
    
    a:visited {
      color : #b2b;
    }
    
    Adjust to suit.
     
  3. nelly22 thread starter macrumors 6502

    Joined:
    Sep 29, 2009
    #3
    Thanks.

    I can't get it to work. I tried tweak code but i'm CSS newbie.

    This site has in its .css file this code:

    A {
    /* color: #428dff;*/
    color: #000000;
    text-decoration: none;
    }

    A:hover {
    /*color: #ffb062;*/
    color: #000000;
    text-decoration: none;
    }
     
  4. dan1eln1el5en macrumors 6502

    dan1eln1el5en

    Joined:
    Jan 3, 2012
    Location:
    Copenhagen, Denmark
  5. nelly22 thread starter macrumors 6502

    Joined:
    Sep 29, 2009
    #5
    If i ask site owner to fix capital a, then does my problem go away? Thanks
     
  6. dan1eln1el5en macrumors 6502

    dan1eln1el5en

    Joined:
    Jan 3, 2012
    Location:
    Copenhagen, Denmark
    #6
    it's definately a source of error.

    could be more things too, but thats a way fix a possible problem.
     
  7. damir.hara macrumors newbie

    damir.hara

    Joined:
    May 14, 2007
    Location:
    SLC, UT
    #7
    First of all, /* and */ are comment elements in CSS. Anything between these two will not be "read" by the browser.

    Second of all, your css pseudo element should be :visited instead of :hover. So changed the capital A's to a and add a:visited for the bottom one. Then get rid of the /* and */ as well as the color: #000000; on both.

    Hope that makes sense.
     
  8. Dunmail macrumors regular

    Joined:
    Mar 27, 2009
    Location:
    Skipton, UK
    #8
    Uppercase tags are only an error if the document is served as XHTML, if it's plain HTML then either upper or lower case are valid though most sites these days use lowercase.

    In some cases (particularly Internet Explorer) CSS rules with the selector written in lower case are converted to upper case by the browser before being applied. So "a:hover" gets converted to "A:hover".
     

Share This Page