Stylesheet linking question

D

Dylan Parry

Davmagic said:
How can I change the href path so that I need to place the stylesheet
into only my root directory?

<link rel="stylesheet" href="/style1.css" type="text/css">
^
 
D

Davmagic .Com

Right now I link to my stylesheet with this code on all my pages:

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

I have several directories, and using the above code requires that I
place the stylesheet into each directory...

How can I change the href path so that I need to place the stylesheet
into only my root directory?

Web Design, Magic, Painting, Junking, More
http://www.davmagic.com/
Paint A House
http://www.paintahouse.com/
NOTE: This emailbox is CLOSED do NOT reply!!!
 
S

Steve Pugh

Right now I link to my stylesheet with this code on all my pages:

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

I have several directories, and using the above code requires that I
place the stylesheet into each directory...

How can I change the href path so that I need to place the stylesheet
into only my root directory?

The same way you would for any other link.

href="../style1.css" to refer to a stylesheet one level higher up,
etc.
Or href="/style1.css" to refer to a stylesheet in the site root.

Steve
 
D

Davmagic .Com

From: (e-mail address removed) (Steve Pugh)
The same way you would for any other
link.
href="../style1.css" to refer to a stylesheet
one level higher up,
etc.

This I am not familiar with... putting "two dots" before the forward
slash... is this explained anywhere?
Or href="/style1.css" to refer to a
stylesheet in the site root.

This is what I figured to be the way to reference the root directory,
and I have now made all the changes to my pages, to reflect this path...

Thanks....

Web Design, Magic, Painting, Junking, More
http://www.davmagic.com/
Paint A House
http://www.paintahouse.com/
NOTE: This emailbox is CLOSED do NOT reply!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top