Loading ...
Sorry, an error occurred while loading the content.

Re: [NH] Colors of link, vlink & alink when using a photo background.

Expand Messages
  • woodysnomad
    Thanks for all your replies... Here is what I have done: This is the code in my index.htm file seting up the CSS
    Message 1 of 14 , May 6, 2008
    • 0 Attachment
      Thanks for all your replies... Here is what I have done:

      This is the code in my index.htm file seting up the CSS
      <link rel="stylesheet" type="text/css" ref="Style3.css">

      This is the code I used to get a lite brownish background with dark
      brown letters with links. At one time they worked???
      <!--
      body { background-color: #FFCC99; color: #660000;
      font-family: tahoma; font = bold; size = -1 }
      a:link {color = "#660000" ; font = "bold" }
      a:visited {color = "#000000" ; font = "bold" }
      a:active {color = "#663333" ; font = "bold" }
      -->

      This is the code I used to get the photo background which looks like
      a pine board with dark brown letters. It also worked???
      <style>
      <!--
      body { background-image: url(woodh1.jpg);
      color: #660000;
      font-family: tahoma;
      font-weight: bold;
      font-size: -1 }
      -->
      </style>

      I have seen several ways to write the code and I just don't know what
      is the right way anymore. I am back to ground zero. When I used the
      brown background, the links all worked with black and a lighter brown
      letters and when I put the same code in with the photo, I would get
      blue and other wierd colors. Need lots of help...
      Thanks, Joe
    • Marcelo de Castro Bastos
      ... OK, in the first example your CSS syntax is just wrong. You are using HTML syntax in CSS, which won t work, unless the browser is more forgiving than it
      Message 2 of 14 , May 6, 2008
      • 0 Attachment
        Interviewed by CNN on 6/5/2008 13:38, woodysnomad told the world:
        > Thanks for all your replies... Here is what I have done:
        >
        > This is the code in my index.htm file seting up the CSS
        > <link rel="stylesheet" type="text/css" ref="Style3.css">
        >
        > This is the code I used to get a lite brownish background with dark
        > brown letters with links. At one time they worked???
        > <!--
        > body { background-color: #FFCC99; color: #660000;
        > font-family: tahoma; font = bold; size = -1 }
        > a:link {color = "#660000" ; font = "bold" }
        > a:visited {color = "#000000" ; font = "bold" }
        > a:active {color = "#663333" ; font = "bold" }
        > -->
        >
        > This is the code I used to get the photo background which looks like
        > a pine board with dark brown letters. It also worked???
        > <style>
        > <!--
        > body { background-image: url(woodh1.jpg);
        > color: #660000;
        > font-family: tahoma;
        > font-weight: bold;
        > font-size: -1 }
        > -->
        > </style>
        >
        > I have seen several ways to write the code and I just don't know what
        > is the right way anymore. I am back to ground zero. When I used the
        > brown background, the links all worked with black and a lighter brown
        > letters and when I put the same code in with the photo, I would get
        > blue and other wierd colors. Need lots of help...
        > Thanks, Joe
        >
        >
        >
        OK, in the first example your CSS syntax is just wrong. You are using
        HTML syntax in CSS, which won't work, unless the browser is more
        forgiving than it should be. Your second example is MOSTLY right, though.

        Let's see point by point:
        - Don't use the equal sign to assign property values in CSS; use a colon.
        - Also, don't use quotes in the property values.
        - "-1" is NOT an acceptable value for the "font-size" property.
        Acceptable values are:
        * Absolute-size keywords [ xx-small | x-small | small | medium |
        large | x-large | xx-large ]
        * Relative size keywords [smaller | larger ]
        * Size in valid CSS units (px, pt, em, %) -- usage of em or % is
        suggested as px and pt can cause problems.
        - It's good practice to assign MORE than one name in the "font-family"
        property -- if the browser can't find the first font, it will try the
        second, then the third and so on, until it finds one it can use. A good
        idea is to use a generic font name as the last one. Generic font names
        are 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace'.
        - Although {font:bold} is a valid syntax, you should be careful using
        this: "font" by itself is a SHORTHAND syntax, supposed to set a number
        of attributes in one line, and it might end up setting attributes you
        didn't want to change. Try using separate properties to set each
        attribute, like you did in your second example.



        Marcelo
        -=-=-
        Look Ma, No Taglines!
        * TagZilla 0.066 on Seamonkey 1.1.9
      • Axel Berger
        As to colour I stand by what several people wrote, it must be perception. As a case in point I have just adjusted the default colours in my browsers a little.
        Message 3 of 14 , May 6, 2008
        • 0 Attachment
          As to colour I stand by what several people wrote, it must be
          perception. As a case in point I have just adjusted the default colours
          in my browsers a little. Text made of thin lines looks totally different
          from the block of colour where I define it, it took many trial and error
          steps to get it right. (My being colour deficient limits choices.)

          But additionally we no longer use MGA or CGA, where a pixel is a pixel,
          but proportional fonts where lines straddle pixel boundaries. The actual
          pixel then becomes a mixture of foreground and background colour. You
          can see that by taking a screen shot and zooming very far in with a tool
          that does not smooth the enlargement but shows actual pixels as square
          blocks (Irfanview when looking at a selection). There's not much you can
          do but live with it and choose colours it does not become too bad with.

          woodysnomad wrote:
          > body { font = bold; size = -1 }

          I've done that myself, as it seems to be the taste of the advertising
          flacks and the masses have come to expect it, but it is wrong. You can
          use big and small script where appropriate, but the main text, the bread
          font, ought to be left well alone. The reader chooses how he likes it
          best for optimal legibility and it is up to us to respect their choices.
          In fact three out of four of my browsers are set to ignore all font
          style, size, and colour directives that may be in the page and present
          them exactly the way I find them most comfortable to read.
          At least test your pages with raising and lowering font sizes in the
          browser (<Ctrl><+> in Mozilla) and check they do not break. If they do,
          redesign them.

          And lastly you forgot the basic rule "if you change one colour, change
          them all" If you set a background you must set a font colour and vice
          versa. It may not be very probable, but it's entirely possible that
          someone for whatever reason has set his default font colour to exactly
          or very nearly your choice of background.

          Axel
        • sisterscape
          In addition to what Marcelo listed (he beat me to it!). . . If you are using a linked style sheet you shouldn t include the . I also use around the
          Message 4 of 14 , May 6, 2008
          • 0 Attachment
            In addition to what Marcelo listed (he beat me to it!). . .

            If you are using a linked style sheet you shouldn't include the <!--
            -->.

            I also use " " around the image file name but can't remember why. Mac
            compatability?

            Added background: transparent ; to your links just to be safe a user
            doesn't see something funny.

            Try this:

            body { background-image: url("woodh1.jpg");
            color: #660000;
            font-family: Tahoma, Sans-serif;
            font-weight: bold;
            font-size: 90% }

            a:link {color: #660000 ; background: transparent ; font-weight: bold
            ; font-family: Tahoma, Sans-serif;}
            a:visited {color:#000000 ; background: transparent ; font-weight: bold
            ; font-family: Tahoma, Sans-serif;}
            a:active {color: #663333 ; background: transparent ; font-weight: bold
            ; font-family: Tahoma, Sans-serif;}

            Sister

            --- Marcelo de Castro Bastos <mcblista@...> wrote:
            >
            > OK, in the first example your CSS syntax is just wrong. You are using
            >
            > HTML syntax in CSS, which won't work, unless the browser is more
            > forgiving than it should be. Your second example is MOSTLY right,
            > though.
            >
            > Let's see point by point:
            > - Don't use the equal sign to assign property values in CSS; use a
            > colon.
            > - Also, don't use quotes in the property values.
            > - "-1" is NOT an acceptable value for the "font-size" property.
            > Acceptable values are:
            > * Absolute-size keywords [ xx-small | x-small | small | medium |
            > large | x-large | xx-large ]
            > * Relative size keywords [smaller | larger ]
            > * Size in valid CSS units (px, pt, em, %) -- usage of em or % is
            > suggested as px and pt can cause problems.
            > - It's good practice to assign MORE than one name in the
            > "font-family"
            > property -- if the browser can't find the first font, it will try the
            >
            > second, then the third and so on, until it finds one it can use. A
            > good
            > idea is to use a generic font name as the last one. Generic font
            > names
            > are 'serif', 'sans-serif', 'cursive', 'fantasy', and 'monospace'.
            > - Although {font:bold} is a valid syntax, you should be careful using
            >
            > this: "font" by itself is a SHORTHAND syntax, supposed to set a
            > number
            > of attributes in one line, and it might end up setting attributes you
            >
            > didn't want to change. Try using separate properties to set each
            > attribute, like you did in your second example.
            >
            >
            >
            > Marcelo



            ____________________________________________________________________________________
            Be a better friend, newshound, and
            know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
          • Axel Berger
            ... And I didn t even notice. Am I going balmy? That said, Joe, you really ought to validate your code and your stylesheets. If not for grossly wrong syntax
            Message 5 of 14 , May 6, 2008
            • 0 Attachment
              sisterscape wrote:
              > In addition to what Marcelo listed (he beat me to it!). . .

              And I didn't even notice. Am I going balmy?
              That said, Joe, you really ought to validate your code and your
              stylesheets. If not for grossly wrong syntax then for all those
              nasty typos and missing brackets that creep in.

              In fact, if anything does not seem to work as expected, validation
              should always be the first step. If the code is valid, you can look
              for faulty logic, but if not, some tiny innocuous mistake might take
              ages to find on your own.

              Axel
            Your message has been successfully submitted and would be delivered to recipients shortly.