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

Re: [NH] CSS

Expand Messages
  • Rudolf Horbas
    Don t worry, Lloyd. ... Yes, there is. When You label parts of Your content, don t think of how it might look like later, but what these parts mean in the
    Message 1 of 38 , Jul 22, 2003
      Don't worry, Lloyd.

      > It
      > looks like there is no real good descriptive way to label it for now and
      > for later also.

      Yes, there is. When You label parts of Your content, don't think of how
      it might look like later, but what these parts mean in the context of
      Your pages.

      Do they repeat on the page, are they unique, will they only turn up in
      certain HTML elements, etc.

      So, You could divide Your style sheet into several parts, like
      "navigation" and "content" styles.

      Depending on the navigation You use, You assign styles to the needed
      elements. Very often navigation will be in tables:

      <example>

      ...

      /* styles for navigation */

      TD.nav, TD.nav A {
      font-family: Arial, Helvetica, sans-serif;
      color: #ffffff;
      background-color: #000000;
      font-size: 12pt;
      }
      TD.navselected, TD.navselected A {
      font-family: Arial, Helvetica, sans-serif;
      color: #000000;
      background-color: #ffffff;
      font-weight: bold;
      font-size: 12pt;
      }
      TD.subnav, TD.subnav A {
      font-family: Arial, Helvetica, sans-serif;
      color: #000000;
      background-color: #808080;
      font-size: 10pt;
      }
      TD.subnavselected, TD.subnavselected A {
      font-family: Arial, Helvetica, sans-serif;
      color: #000000;
      background-color: #808080;
      font-weight: bold;
      font-size: 10pt;
      }

      ...

      </example>

      The second selector ( TD.nav A ) is for the link, as this would
      otherwise be in the standard color.

      From the perspective of usability, it is a good idea to leave links in
      the original color, but as these links are repeating parts of Your
      navigation, it is ok to deviate from the standard color.T
      Two caveats though:
      1. leave them underlined
      2. define a visited style for these links:

      TD.subnav A:visited {
      color: othercolor;
      }

      Another section would contain content styles, as headings, intro
      paragraphs, etc.:

      <example>
      ...

      /* content styles */

      H1 {
      font-family: Arial, Helvetica, sans-serif;
      color: #ff0000;
      font-size: 15pt;
      text-transform: uppercase;
      }

      H2 {
      font-family: Times New Roman, Times, serif;
      color: #ff0000;
      font-size: 13pt;
      }

      P.intro {
      font-family: Arial, Helvetica, sans-serif;
      font-weight: bold;
      font-size: 11pt;
      }

      P {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 11pt;
      }

      DIV.author {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 11pt;
      text-transform: uppercase;
      }

      DIV.date {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 10pt;
      font-style: italic;
      }
      ...
      </example>

      Keep this in mind:
      Drop the habit of formatting while bulding a document, rather give it a
      meaningful structure, using standard HTML elements and, if You must,
      define separate classes, if You require more formats for one element.

      If You get to understand this principle, 1. Your HTML gets better and,
      maybe, 2. Your content gets better, as You develop an awareness of the
      structure of Your pages.

      CSS is a lot of fun!
      But always remember: Your pages must be readable and accessible without
      Your fancy style sheet -- as a test, just remove or rename it and view
      Your page. You should get a basic, well structured HTML page (like in
      the good old days).

      Enjoy,
      Rudi
      --
      Munich, Germany
    • lloyd2
      Hi Robert, I have only had two directories for a couple of days. I ll have to let that settle in before I jump into more. I can see the reasoning for all those
      Message 38 of 38 , Jul 22, 2003
        Hi Robert,

        I have only had two directories for a couple of days. I'll have to let that
        settle in before I jump into more. I can see the reasoning for all those
        subdirectories as you showed them.

        It will be a while before I have all 250 or 260 pages rebuilt. That should
        give enough time to mull this over.

        Thank you,

        Lloyd
        ~~~~~~~~~~~~~
        > Actually, I plan from the start to keep things in a specific
        > place, that
        >way I don't "loose" files or forget to put something online because I think
        >I already have it there. Basically, I use a very simple structure:
        >
        >The web site root has all of the html files (just html)
        > - styles (subdirectory for linked style sheets)
        > - scripts (for links java, javscript, php, perl, etc. scripts)
        > - images (for all web site images)
        > - pictures (for photo albums and such)
      Your message has been successfully submitted and would be delivered to recipients shortly.