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

Re: [NH] Tidy Warning For

Expand Messages
  • Ray Shapp
    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
    Message 1 of 14 , Dec 5, 2009
    • 0 Attachment
      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).



      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.

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



      Lotta said, "The :active rule will be overridden by the :visited rule with the
      order above." As you can see above, when the page was all HTML without any
      CSS, the alink was last in sequence. Yes, I would like to provide for
      link-visited-focus-hover-active. Please give me an example.

      Now, I'm trying to do two things at once. I'm cleaning the shoddy markup on a
      page I did years ago, and I'm trying to introduce a basic style sheet that I
      can use throughout the website.

      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.

      Again, I thank you.

      Ray Shapp

      ***style sheet "C:\asterism\styles\AAIbasic.css" begins after one blank line
      below***

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

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

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

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

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

      .basic_issue {
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : .8em;
      line-height: 1.2em;
      margin-left: 0%;
      margin-right: 0%;
      }

      .basic_page {
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : .8em;
      line-height: 1.2em;
      margin-left: 2%;
      margin-right: 0%;
      }

      .basic_title {
      font-family : Arial, sans-serif;
      font-size : .8em;
      line-height: 1.2em;
      font-weight : bold;
      margin-left: 0%;
      margin-right: 0%;
      }

      .basic_author {
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : .8em;
      line-height: 1.2em;
      margin-left: 0%;
      margin-right: 0%;
      }

      .basic_subtitle {
      display: block;
      color : #dd5622;
      font-family : Arial, sans-serif;
      font-size : .8em;
      font-weight : bold;
      margin-left: 2%;
      margin-right: 0%;
      }

      .basic_summary {
      display: block;
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : .8em;
      margin-left: 2%;
      margin-right: 0%;
      }

      .basic_leading {
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : .5em;
      margin-left: 0%;
      margin-right: 0%;
      }

      .basic_body_text {
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : 1.0em;
      margin-left: 0%;
      margin-right: 0%;
      }

      .basic_nav_text {
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : .8em;
      font-weight : bold;
      margin-left: 0%;
      margin-right: 0%;
      }

      .basic_prototype {
      background-color : #D3D3D3;
      border-top : 1px solid #000000;
      width : 800px;
      color : #000000;
      font-family : Arial, sans-serif;
      font-size : .8em;
      vertical-align: bottom;
      font-weight : bold;
      padding : 2px 5px;
      line-height: 1.2em;
      margin-left: 0%;
      margin-right: 0%;
      }





      ***the web page "C:\asterism\gallery\weasner.htm" follows one blank line
      below***

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd"><html>
      <head>
      <title>
      Amateur Astronomers, Inc. - Weasners Visit Sperry
      </title>
      <link rel="StyleSheet" href="../styles/AAIbasic.css" type=
      "text/css" title="Common Style for AAI">
      </head>
      <!--==== Program: weasner.htm , Author: Ray Shapp ==========-->
      <body text="#000000" bgcolor="#D3D3D3" link="#0000FF" vlink=
      "#800000" alink="#FF0000">
      <center>
      <table border="0" cellpadding="2" width="460">
      <tr>

      <td>
      <img src="../gifs/astrline.gif" alt=
      "Drawing of Observatory" width="460" height="42">
      </td>
      </tr>
      <tr>
      <td>
      <center>
      <font face="Arial,Helvetica" color="#000000" size=
      "5"><b><u>The Weasners Visit Sperry</u></b></font>

      </center><br>
      <br>
      </td>
      </tr>
      <tr>
      <td>
      <p align="left">
      <font face="Arial,Helvetica" color="#000000" size=
      "3">Mike and Laurraine Weasner visited Sperry
      Observatory on August 15, 2001. Mike has operated
      <a href=
      "http://www.weasner.com/etx/menu.html">Weasner's
      Mighty ETX</a> website since September, 1996. Mike's
      website emphasizes the Meade ETX line of telescopes,
      but it also gives very useful tips and techniques for
      the Meade LX-90 , the AutoStar robotic controller, as
      well as other information which is of broad
      applicability to amateur astronomers. Mike Weasner
      has received the 2001 annual Astronomical
      Achievements Award from the Arkansas Sky
      Observatory.</font>

      </p><font face="Arial,Helvetica" color="#000000" size=
      "3"><br>
      <br></font>
      </td>
      </tr>
      <tr>
      <td align="center">
      <font face="Arial,Helvetica" color="#000000" size=
      "3"><a><img src="gifs/weasnr1.jpg" width="586" height=
      "384" border="0" alt="Weasners arrive"></a></font>
      <p>
      <font face="Arial,Helvetica" color="#000000" size=
      "3">Joe Powell and Ray Shapp greet the Weasners in
      front of the Sperry Obseratory.</font>

      </p><br>
      <br>
      </td>
      </tr>
      <tr>
      <td align="center">
      <font face="Arial,Helvetica" color="#000000" size=
      "3"><a><img src="gifs/weasn2.jpg" width="496" height=
      "480" border="0" alt=
      "Weasners in the west dome"></a></font>
      <p>
      <font face="Arial,Helvetica" color="#000000" size=
      "3">The Weasners and Joe Powell in the west dome
      which houses the 24-inch Cassegrain telescope.</font>

      </p>
      </td>
      </tr>
      </table><br>
      <br>
      <center>
      <table width="460" border="0" cellpadding="2">
      <tr>
      <td align="center">

      <a href="gallry01.htm"><img src=
      "../gifs/orangbl1.gif" border="0" alt="Orange ball bullet">
      <font class="basic_nav_text">
      <b>Return to Photo
      Gallery</b></font></a><br>
      </td>
      </tr>
      <tr>
      <td align="center">
      <a href="../aaihome.htm"><img src=
      "../gifs/orangbl1.gif" border="0" alt="Orange ball bullet">
      <font class="basic_nav_text">
      <b>Return to Home</b></font></a>

      </td>
      </tr>
      <tr>
      <td></td>
      </tr>
      <tr>
      <td align="center">
      <font face="Arial,Helvetica" color="#000000" size=
      "2">Maintained by <script type="text/javascript">
      <!--
      document.write("<a
      href='mailto:ray@asterism.org'>
      Ray Shapp<\/a>")
      // -->
      </script><br>
      Page last updated 12/05/2009</font>
      </td>

      </tr>
      </table>
      </center>
      </center>
      </body>
      </html>
    • 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 2 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 3 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 4 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 5 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 6 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 7 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 8 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 9 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 10 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 11 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.