By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

Moving from CSS in html to a file.css

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a

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