468,168 Members | 1,477 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Having trouble linking to stylesheet

Hi:

I am brand new to css and a have a limited amount of working knowledge
regarding HTMl. This is primarily from using Frontpage. I recently
purchased Stylemaster, a css authoring program, and created a
stylesheet. Here's my problem. When I link to the stylesheet only
the background image appears. None of the other statements describing
the page seem to work. I have embedded the code in another page and
that page works fine. This is the link code that is inserted in the
head section of the page <link rel="stylesheet" type="text/css"
href="beta_style.css" /> I have saved both the page and stylesheet
in the same folder on my computer. Any help would be great.

Thanks
Gary

May 22 '06 #1
9 1758
gk*****@freestuffland.com wrote:
When I link to the stylesheet only
the background image appears. None of the other statements describing
the page seem to work. I have embedded the code in another page and
that page works fine. This is the link code that is inserted in the
head section of the page <link rel="stylesheet" type="text/css"
href="beta_style.css" /> I have saved both the page and stylesheet
in the same folder on my computer. Any help would be great.


That should work just fine. Make sure the link tag is in the head. Can
you provide a URI for the page, there may be something else going on.
--
Brian O'Connor (ironcorona)
May 22 '06 #2
gk*****@freestuffland.com wrote:

[...], and created a
stylesheet. Here's my problem. When I link to the stylesheet only
the background image appears. None of the other statements describing
the page seem to work. [...]

An URL would go a long to way.
The most likely reason is that there is an error in the CSS code. But
without an URL anything else is WAG.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
May 22 '06 #3
gk*****@freestuffland.com wrote:
Hi:

I am brand new to css and a have a limited amount of working knowledge
regarding HTMl. This is primarily from using Frontpage. I recently
purchased Stylemaster, a css authoring program, and created a
stylesheet. Here's my problem. When I link to the stylesheet only
the background image appears. None of the other statements describing
the page seem to work. I have embedded the code in another page and
that page works fine. This is the link code that is inserted in the
head section of the page <link rel="stylesheet" type="text/css"
href="beta_style.css" /> I have saved both the page and stylesheet
in the same folder on my computer. Any help would be great.

Thanks
Gary


Try validating the CSS file at <http://jigsaw.w3.org/css-validator/>.
Sometimes, the first error encountered in a style-sheet file inhibits
any processing of later declarations in the same file. (It is more
likely that an error in a declaration merely inhibits further processing
of that declaration.)

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
May 22 '06 #4
Hi Brian:

Sorry for the late response.

Here's the url to the stylesheet.
http://freestuffland.com/beta_site/beta_style.css

and the url to the linked page:
http://freestuffland.com/beta_site/test.htm

Hope this is what you wanted. All the images are housed in the same
folder. Thanks for looking.

Gary

May 23 '06 #5
Hi Jim:

Sorry for the late response.

Here's the url to the stylesheet.
http://freestuffland.com/beta_site/beta_style.css

and the url to the linked page:
http://freestuffland.com/beta_site/test.htm

Hope this is what you wanted. All the images are housed in the same
folder. Thanks for looking.

Gary

May 23 '06 #6
Hi David:

Thanks for the info. Took your advice and ran the stylsheet thru w3c
cameback with a bunch of warnings. I am going to try to correct them
all and re-check. Will let everyone know what happens.
Thanks
Gary

May 23 '06 #7
<gk*****@freestuffland.com> wrote:
Sorry for the late response.
By not posting the URL in the original message, you mainly created trouble
to yourself, preventing others from helping you.
Here's the url to the stylesheet.
http://freestuffland.com/beta_site/beta_style.css

and the url to the linked page:
http://freestuffland.com/beta_site/test.htm


But that's different from what you wrote previously, when you described your
link element as

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

The HTML document you mention contains

<style type="text/css" ></style>
<link rel="stylesheet" type="text/css"
href="http://user831273.wx8.registeredsite.com/beta_site/beta_style.css" />

The empty <style> element is pointless, though probably harmless, and using
an absolute URL as the address of the stylesheet is odd.

Originally, you wrote: "Here's my problem. When I link to the stylesheet
only
the background image appears. None of the other statements describing
the page seem to work."
The URL you gave now refers to an HTML document with an empty <body>
element. What do you expect to happen in the rendering of such a document?

May 23 '06 #8
gk*****@freestuffland.com wrote:
Hi Brian:

Sorry for the late response.

Here's the url to the stylesheet.
http://freestuffland.com/beta_site/beta_style.css

and the url to the linked page:
http://freestuffland.com/beta_site/test.htm

Hope this is what you wanted. All the images are housed in the same
folder. Thanks for looking.


The problem is that you don't have any html in the body.
--
Brian O'Connor (ironcorona)
May 23 '06 #9
gk*****@freestuffland.com wrote:

and the url to the linked page:
http://freestuffland.com/beta_site/test.htm

I've been on vacation. Ah....
The URL above does not work.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jun 2 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mike | last post: by
reply views Thread by Mike | last post: by
3 posts views Thread by Headless | last post: by
5 posts views Thread by Don G | last post: by
1 post views Thread by chitrasai | last post: by
reply views Thread by nachitas | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.