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

6644Re: External CSS Style Sheet for Top Page

Expand Messages
  • Ray Shapp
    Jun 6, 2009
    • 0 Attachment
      Hi Margaret,

      Thanks for reference to the great sites. I've spent hours just a-clickin' and
      a-tryin'.

      I tried to adopt the RGB to HEX converter at
      http://www.javascripter.net/faq/index.htm to change the background color to
      the color that the user enters. The conversion to HEX works fine, but the
      background changes to black regardless of what RGB codes were entered.

      Maybe you can see my error in the following:

      <script type="text/javascript">
      function RGBtoHex(R,G,B) {return toHex(R)+toHex(G)+toHex(B)}
      function toHex(N) {
      if (N==null) return "00";
      N=parseInt(N); if (N==0 || isNaN(N)) return "00";
      N=Math.max(0,N); N=Math.min(N,255); N=Math.round(N);
      RGBcode="0123456789ABCDEF".charAt((N-N%16)/16)
      + "0123456789ABCDEF".charAt(N%16);
      document.bgColor=RGBcode;
      return RGBcode;
      }
      </script>

      Thanks for your help.

      Ray Shapp


      ----- Original Message -----
      From: "Margaret Peloquin" <peloquin@...>
      To: <ntb-html@yahoogroups.com>
      Sent: Saturday, June 06, 2009 11:58 AM
      Subject: Re: [NH] External CSS Style Sheet for Top Page


      > I've had good luck with the sample CSS templates from this site:
      > http://www.dynamicdrive.com/style/layouts/category/C9/
      >
      > In addition, when you need to either refresh your knowledge or help to solve
      > a
      > particular coding issue, this is a good site to consult:
      > http://www.w3schools.com/css/default.asp
      >
      >
      >
    • Show all 6 messages in this topic