467,115 Members | 1,279 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,115 developers. It's quick & easy.

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.clsMenuItemNS, .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.clsMenuItemNS, .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.
Jul 20 '05 #1
  • viewed: 3040
Share:
3 Replies
On 26 May 2004 13:38:09 -0700, Alex <al**@totallynerd.com> wrote:
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.


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...?

Jul 20 '05 #2
On Wed, 26 May 2004 17:09:59 -0400, Neal <ne*****@yahoo.com> wrote:
On 26 May 2004 13:38:09 -0700, Alex <al**@totallynerd.com> wrote:
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.


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...?


In addition, please upload to the WWW and provide a URL to make this
easier...
Jul 20 '05 #3

"Alex" <al**@totallynerd.com> schreef in bericht
news:2b**************************@posting.google.c om...
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.clsMenuItemNS, .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.

works all right for me
Pierre
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by George Ziniewicz | last post: by
6 posts views Thread by Hemant Shah | last post: by
1 post views Thread by mmalloc@gmail.com | last post: by
10 posts views Thread by cjparis | last post: by
reply views Thread by linkswanted | last post: by
reply views Thread by linkswanted | last post: by
reply views Thread by linkswanted | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.