Moving from CSS in html to a file.css

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex

    Moving from CSS in html to a file.css

    Hi all,

    I'm kind of new to CSS, and I have a few lines of CSS code in my page
    that I want moved to a .css file instead of using Style tabs in page.

    Below is what I have that works:

    <html>
    <head>
    <title>Sample Page</title>
    <style>
    all.clsMenuItem NS, .clsMenuItemIE{ text-decoration: none; font: bold
    12px Arial; color: #FFCC33; cursor: hand; z-index:100}
    #MainTable A:hover {color: #ffffff}
    </style>
    </head>
    <body> ... and so forth.

    The code above works great, but I want the CSS moved into a file.
    Below is what I'm trying, but it's not yielding any results:

    <html>
    <head>
    <title>Sample Page</title>
    <link rel="stylesheet " href="alex1.css " type="text/css">
    </head>
    <body> ... and so forth.

    alex1.css contains the following:
    all.clsMenuItem NS, .clsMenuItemIE{ text-decoration: none; font: bold
    12px Arial; color: #FFCC33; cursor: hand; z-index:100}
    #MainTable A:hover {color: #ffffff}

    Any suggestions? What am I doing wrong? According to the resources
    I've looked at this syntax is correct.

    Thanks,

    Alex.
  • Neal

    #2
    Re: Moving from CSS in html to a file.css

    On 26 May 2004 13:38:09 -0700, Alex <alex@totallyne rd.com> wrote:
    [color=blue]
    > I'm kind of new to CSS, and I have a few lines of CSS code in my page
    > that I want moved to a .css file instead of using Style tabs in page.[/color]

    It looks like it should work, unless I'm missing something obvious.

    1) css file is in same directory as html?

    2) Browsers you tested it with are...?

    Comment

    • Neal

      #3
      Re: Moving from CSS in html to a file.css

      On Wed, 26 May 2004 17:09:59 -0400, Neal <neal413@yahoo. com> wrote:
      [color=blue]
      > On 26 May 2004 13:38:09 -0700, Alex <alex@totallyne rd.com> wrote:
      >[color=green]
      >> I'm kind of new to CSS, and I have a few lines of CSS code in my page
      >> that I want moved to a .css file instead of using Style tabs in page.[/color]
      >
      > It looks like it should work, unless I'm missing something obvious.
      >
      > 1) css file is in same directory as html?
      >
      > 2) Browsers you tested it with are...?
      >[/color]

      In addition, please upload to the WWW and provide a URL to make this
      easier...

      Comment

      • P.J.M. Smit

        #4
        Re: Moving from CSS in html to a file.css


        "Alex" <alex@totallyne rd.com> schreef in bericht
        news:2ba4b4eb.0 405261238.2bf09 92d@posting.goo gle.com...[color=blue]
        > Hi all,
        >
        > I'm kind of new to CSS, and I have a few lines of CSS code in my page
        > that I want moved to a .css file instead of using Style tabs in page.
        >
        >
        > The code above works great, but I want the CSS moved into a file.
        > alex1.css contains the following:
        > all.clsMenuItem NS, .clsMenuItemIE{ text-decoration: none; font: bold
        > 12px Arial; color: #FFCC33; cursor: hand; z-index:100}
        > #MainTable A:hover {color: #ffffff}
        >
        > Any suggestions? What am I doing wrong? According to the resources
        > I've looked at this syntax is correct.
        >
        > Thanks,
        >
        > Alex.[/color]
        works all right for me
        Pierre


        Comment

        Working...