473,396 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
3 3205
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: George Ziniewicz | last post by:
.. I have an html file with javascript functions in the <head> section that work fine when called from events or instanced as objects. When I move the functions to an external js file they don't...
4
by: Jake j | last post by:
To those of you who sent me working examples of js include routines, much thanks. I see from them examples that what I'm trying to get to requires a higher level of js knowledge than I've got. ...
6
by: Hemant Shah | last post by:
Folks, I need to move HOME directory of an instance to another directory. What is the best way of doing it? Is changing password file enough? or dies DB2 store this info in it's own config? ...
2
by: Paul | last post by:
I am moving an existing app written years ago to a new server. It uses Sigma Template 1.3 and Quickform 1.1.1 and PEAR.php,v 1.1.1.1 2004/02/16 The directory structure is like this: /site...
1
by: mmalloc | last post by:
I have the following code to move some text with javascript that works both on ie and ff. I can't make it XHTML compatble. If i remove the doctype info it will work. I'm sorry to bother with such...
10
by: cjparis | last post by:
Hello everyone. If anyone can give me a hand I would be gratefull Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE...
0
by: linkswanted | last post by:
http://www.movingcompanies.co.il/supplies/boxes.html http://www.movingcompanies.co.il/residental/ http://www.movingcompanies.co.il/commercial/corporate-moves.html...
0
by: linkswanted | last post by:
We are your trusted source. World Moving & Storage is bonded and licensed by the U.S. Department of Transportation and is one of the largest residential moving and corporate relocation company in...
0
by: linkswanted | last post by:
We are your trusted source. World Moving & Storage is bonded and licensed by the U.S. Department of Transportation and is one of the largest residential moving and corporate relocation company in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.