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

Re: [NH] Tidy Warning For

Expand Messages
  • Marcelo Bastos
    ... Oh. Pseudo-classes are treated similarly to regular classes, only they are generated automatically from the context. The only real mistake you did was...
    Message 1 of 14 , Dec 5, 2009
    • 0 Attachment
      Interviewed by CNN on 6/12/2009 02:44, Ray Shapp told the world:
      > Hi Marcelo and Lotta,
      >
      > Thanks for the quick replies.
      >
      > I should have said I'm really a novice at using CSS. My problem is very basic.
      > I'm not sure how or where to add pseudo-classes. That's why I asked whether
      > they go into the style sheet or into the web page (or a little of both).

      Oh. Pseudo-classes are treated similarly to regular classes, only they
      are generated automatically from the context. The only real "mistake"
      you did was... well, not actually inserting the styles into the stylesheet.

      So, you don't have to do anything to the HTML (well, except removing
      those offending attributes from the <body> tag); it's all done in the CSS.

      So, you might change the beginning of your CSS file as such:

      *** Begin stylesheet snippet ***


      @charset "utf-8";
      /* CSS Document */
      /* Adapted by Ray Shapp */
      /* New pages in AAI website can link to this style sheet */
      /* Revised 11/23/2009 */

      body {color:#000000;
      background-color:#D3D3D3;}

      a:link { color: red }
      a:visited { color: green; font-size: 85%; }
      /* a:focus { color: blue; font-size: 125%; } */
      /* a:hover { color: blue; font-size: 125%; } */
      a:active { color: blue; font-size: 125%; }

      .basic_headline_black_largest {
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : 1.8em;
      font-weight : bold;
      }



      *** End Stylesheet snippet ***

      Note that, as pointed out by Lotta, I moved "active" to the last
      position. "Active" is the style applied WHEN YOU ARE ACTUALLY CLICKING
      ON THE LINK.
      I added dummy lines (commented out) for "Hover" and "focus" too.
      "Hover" is the one applied when your mouse passes over the link.
      "Focus" applies when you are moving from link to link using the
      keyboard, mostly.
      Many people don't bother to declare a "focus" style.



      And the HTML file heading

      > <body text="#000000" bgcolor="#D3D3D3" link="#0000FF" vlink= "#800000"
      > alink="#FF0000">

      would become just <body>. Well, I like to declare a language here, so
      you might as well put <body lang="en"> to declare that the text is in
      English, so spellcheckers and such have an easier time.

      A hint: try not to mess with font size, family, weight, style and such
      in pseudo-classes -- since the link words will probably change size
      (even for monospaced fonts!), it creates a "moving text" effect that is
      kinda weird. Colors, borders and text-decoration are much safer.

      --
      MCBastos

      This message has been protected with the 2ROT13 algorithm. Unauthorized
      use will be prosecuted under the DMCA.

      -=-=-
      ... BOFH excuse #4:
      static from nylon underwear
      * TagZilla 0.0661 * http://tagzilla.mozdev.org on Seamonkey 2.0
    • loro
      ... They are CSS, so in your style sheet. ... Still isn t proprietary but, as said, not allowed in Strict. But I see below that you use Transitional, so
      Message 2 of 14 , Dec 5, 2009
      • 0 Attachment
        Ray wrote:
        >I'm not sure how or where to add pseudo-classes. That's why I asked whether
        >they go into the style sheet or into the web page (or a little of both).

        They are CSS, so in your style sheet.

        >I said, "I get a warning that says the alink attribute is proprietary to
        >Netscape or Internet Explorer.", and Lotta replied, "That doesn't
        >make sense."
        >OK, here is the offending line (next below). I want to replace everything
        >except "<body>" with the equivalent CSS.

        Still isn't proprietary but, as said, not allowed in Strict. But I
        see below that you use Transitional, so nothing wrong with it at all.
        The HTML validates without errors.

        > As you can see above, when the page was all HTML without any
        >CSS, the alink was last in sequence.

        Yeah, but that's HTML. The order is of no importance.

        >Yes, I would like to provide for
        >link-visited-focus-hover-active. Please give me an example.

        a:link { color:red; background: inherit }
        a:visited { color: green; background: inherit }
        a:hover { color: white; background: red }

        ....and so on. You just add them one after the other. But in the right order!


        >I'll gladly include here the web page and my best current effort at producing
        >a style sheet. I've already used this style sheet for a few other pages, but
        >even my recently updated pages have the plain vanilla anchor tags without any
        >CSS treatment of the links. The web page follows the style sheet below.

        Yeah, but the link rules you posted before isn't in that style sheet.
        Nothing at all about links there.

        Lotta
      • Ray Shapp
        Hi Marcelo and Lotta, It WORKS! In all the variations of the style sheet I had tried, I preceded the a with a period (and sometimes other stuff too) as in
        Message 3 of 14 , Dec 5, 2009
        • 0 Attachment
          Hi Marcelo and Lotta,

          It WORKS!

          In all the variations of the style sheet I had tried, I preceded the "a" with
          a period (and sometimes other stuff too) as in the following example of
          incorrect coding:

          .a:link { color: blue }

          The fix was almost too simple. Marcelo, your style sheet snippet did the trick
          for me. I also am now using the language attribute in <body lang="en">.

          I have a long way to go to get good benefit from style sheets, but I feel I am
          making progress.

          Many thanks to you both!

          Ray Shapp
        • loro
          ... Yay! :-) ... For the record, that would refer to a any element with the class a but only apply to unvisited links with the class a. This is one of the
          Message 4 of 14 , Dec 6, 2009
          • 0 Attachment
            Ray Shapp wrote:
            >It WORKS!

            Yay! :-)

            >In all the variations of the style sheet I had tried, I preceded the "a" with
            >a period (and sometimes other stuff too) as in the following example of
            >incorrect coding:
            >
            > .a:link { color: blue }

            For the record, that would refer to a any element with the class a
            but only apply to unvisited links with the class a.

            This is one of the reasons why it's often better to show the real
            thing, just as it is. Snips get changed more often than not.

            >I also am now using the language attribute in <body lang="en">.

            It's probably better to use lang with HTML. That way you cover the
            whole document, including TITLE.

            >I have a long way to go to get good benefit from style sheets, but I
            >feel I am
            >making progress.

            You'll get there.

            Lotta
          • Axel Berger
            ... That s not how understood it. My reading is, it applies to ALL links unless overridden my a more specific definition like :visited that is defined after
            Message 5 of 14 , Dec 6, 2009
            • 0 Attachment
              loro wrote:
              > > .a:link { color: blue }
              >
              > that would refer to a any element with the class a
              > but only apply to unvisited links with the class a.

              That's not how understood it. My reading is, it applies to ALL links
              unless overridden my a more specific definition like :visited that is
              defined after it. N.B: I found this rule for remebering the correct
              sequence:

              Lord Vaders Former Handle Anakin
              Link Visited Focus Hover Active

              Axel
            • Ray Shapp
              Hi Lotta, ... The line is in the C: asterism gallery weasner.htm page. It is not in the style sheet. Is that what you mean? BTW, I had
              Message 6 of 14 , Dec 6, 2009
              • 0 Attachment
                Hi Lotta,

                > It's probably better to use lang with HTML. That way you cover the
                > whole document, including TITLE.

                The "<body lang="en">" line is in the C:\asterism\gallery\weasner.htm page. It
                is not in the style sheet. Is that what you mean?


                BTW, I had intended that the subject line for this thread be "Tidy Warning
                For 'aline' Anchor Attribute", but I truncated it accidentally.

                Thanks again for all the help.

                Ray Shapp
              • Cary Driscoll
                Lotta meant the attribute should be used with the HTML tag, rather than the BODY tag. ... From: Ray Shapp
                Message 7 of 14 , Dec 6, 2009
                • 0 Attachment
                  Lotta meant the attribute should be used with the HTML tag, rather than the
                  BODY tag.

                  ----- Original Message -----
                  From: "Ray Shapp"


                  > Hi Lotta,
                  >
                  >> It's probably better to use lang with HTML. That way you cover the
                  >> whole document, including TITLE.
                  >
                  > The "<body lang="en">" line is in the C:\asterism\gallery\weasner.htm
                  > page. It
                  > is not in the style sheet. Is that what you mean?
                • Ray Shapp
                  Hi Cary, Thank you for the clarification. I have made the correction.
                  Message 8 of 14 , Dec 8, 2009
                  • 0 Attachment
                    Hi Cary,

                    <<Lotta meant the attribute should be used with the HTML tag, rather than the
                    BODY tag.>>

                    Thank you for the clarification. I have made the correction.

                    Ray Shapp
                  • loro
                    ... Just to be clear. It wasn t an error, the way you had it.You can use lang with almost anything. I just meant that if you intend it to be good for the whole
                    Message 9 of 14 , Dec 8, 2009
                    • 0 Attachment
                      Ray wrote:
                      ><<Lotta meant the attribute should be used with the HTML tag, rather than the
                      >BODY tag.>>
                      >
                      >Thank you for the clarification. I have made the correction.

                      Just to be clear. It wasn't an error, the way you had it.You can use
                      lang with almost anything. I just meant that if you intend it to be
                      good for the whole document, HTML is a more logical place for it

                      Lotta.
                    • Ray Shapp
                      Hi Lotta, Understood. Thank you. Ray Shapp
                      Message 10 of 14 , Dec 8, 2009
                      • 0 Attachment
                        Hi Lotta,

                        <<I just meant that if you intend it to be good for the whole document, HTML
                        is a more logical place for it>>

                        Understood.

                        Thank you.

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