Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Why does my CSS not work?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Alfred
Senior Member

USA
1527 Posts

Posted - 11 June 2004 :  22:21:55  Show Profile  Visit Alfred's Homepage
I have made and saved an external CSS file, and followed the help guide to insert it into a new page, but nothing shows other than the code.
quote:
<link rel="stylesheet" type="text/css" href="file:///C:/Inetpub/wwwroot/BG/heading.css">

The CSS page consists of a BG color and a heading.
Why does it not show?

Alfred
The Battle Group
CREDO

laser
Advanced Member

Australia
3859 Posts

Posted - 11 June 2004 :  22:30:07  Show Profile
I'd get rid of the file:/// reference and use a proper http style.
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 11 June 2004 :  23:16:17  Show Profile  Visit Alfred's Homepage
What do you mean, laser?
This is the code that gets popped in when I select the CSS file.

And when I put the .css file in the same folder it looks like this:
<link rel="stylesheet" type="text/css" href="heading.css">
but shows nothing.

Alfred
The Battle Group
CREDO

Edited by - Alfred on 11 June 2004 23:22:48
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 11 June 2004 :  23:33:17  Show Profile
What's the code in your HTML/ASP file ?
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 11 June 2004 :  23:38:18  Show Profile  Visit Alfred's Homepage
This is what's in the html file!
Or did you mean the rest of the code, or the .css file?

Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 12 June 2004 :  04:19:54  Show Profile
How about both, then we can see what's wrong.
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 12 June 2004 :  21:19:29  Show Profile  Visit Alfred's Homepage
Okay, here is a new page formatted with the css link:
quote:
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<link rel="stylesheet" type="text/css" href="file:///C:/Inetpub/wwwroot/EROTICAL/headingTEST.css">
</head>
<body>
</body>
</html>

and here is the .css file content:
quote:
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>HEADING TEXT</title>
<style fprolloverstyle>A:hover {color: #B7FFFF; font-weight: bold}
</style>
</head>
<body link="#00FFFF" vlink="#00D7D7" alink="#FF0000" bgcolor="#0000FF">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">
<tr>
<td width="100%">
<p align="center">HEADING TEXT</td>
</tr>
</table>
</center>
</div>
<p align="center"><a href="FILE">LINK TEXT</a></p>
</body>
</html>


Alfred
The Battle Group
CREDO
Go to Top of Page

fishsticks
New Member

USA
77 Posts

Posted - 12 June 2004 :  21:55:59  Show Profile  Visit fishsticks's Homepage  Send fishsticks an AOL message
[quote]Originally posted by Alfred

Okay, here is a new page formatted with the css link:

<link rel="stylesheet" type="text/css" href="file:///C:/Inetpub/wwwroot/EROTICAL/headingTEST.css">


It's probably not a good idea to use the path on your hard drive for WWW use. Change that to:


<link rel="stylesheet" type="text/css" href="EROTICAL/headingTEST.css">


or...


<link rel="stylesheet" type="text/css" href="http://www.mydomain.com/EROTICAL/headingTEST.css">

http://www.sharredprism.com

My website!
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 12 June 2004 :  22:10:19  Show Profile  Visit Alfred's Homepage
We are not that far yet - only trying to see the results of linking to a css file in my editor.
Just to make sure I also viewed it in my browser on localhost. It finds it allright, but there is no trace of the formatting I linked to.

Alfred
The Battle Group
CREDO

Edited by - Alfred on 12 June 2004 22:14:59
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 12 June 2004 :  23:22:58  Show Profile
Alfred, your CSS file isn't a CSS file , it's a HTML file. I'm not that hot on CSS but basically a CSS file redefines or extends the normal HTML tags through a series of redefinitions and classes. You don't have any of that there

What do you want your CSS to do ? Define a BG colour and redefine a font it seems ?
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 13 June 2004 :  01:02:04  Show Profile  Visit Alfred's Homepage
Well yes, at least to start with. I want to see ho wit works so I can make better use of it.
I know there are html tags in the code, but it was saved as a .css file in FrontPage. So I assumed it had to be that way.

Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 13 June 2004 :  01:13:01  Show Profile
quote:
I know there are html tags in the code, but it was saved as a .css file in FrontPage.
Easy never trust FrontPage.

What do you want to do with CSS though ?
Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 13 June 2004 :  01:38:22  Show Profile  Visit Alfred's Homepage
Streamline my future web work. It cuts down on size and avoids repetition of code for your basic theme, doesn't it?

Alfred
The Battle Group
CREDO
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 13 June 2004 :  01:54:56  Show Profile
For sure, but you missed the point of my question, I should have worded it like this :

What are you trying to achieve with this CSS file ? You say "BG color and a heading" but if you explain that in more detail someone here can show you the correct syntax to use. Your HTML file is fine, but the CSS file is rubbish.
Go to Top of Page

seven
Senior Member

USA
1037 Posts

Posted - 13 June 2004 :  07:28:14  Show Profile  Visit seven's Homepage
Alfred, when in doubt search Google and you'll find a wealth of information. I would look around the net for CSS tutorials and spend a few hours learning the basics, most sites have good sample code you can use as a start.
Here's a good start: http://www.w3schools.com/css/css_intro.asp



Go to Top of Page

Alfred
Senior Member

USA
1527 Posts

Posted - 13 June 2004 :  21:35:14  Show Profile  Visit Alfred's Homepage
Good thinking, I 'll do that.
I simply looked at the help files in my FrontPage editor, and executed what looked quite straightforward steps. When it did nothing as expected I was perplexed, and kept redoing it.

Laser, once I know what I do wrong I should be fine, and I really want to learn to fish rather than... well, you know the rest!

Alfred
The Battle Group
CREDO
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07