HighDots Forums  

external style sheets

alt.html alt.html


Discuss external style sheets in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David K
 
Posts: n/a

Default external style sheets - 11-02-2003 , 05:21 PM






I am trying to understand external style sheets. How does the

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

connect to the first style sheet html document? How can it tell the other
html documents what to do?

Thanks,
Dave



Reply With Quote
  #2  
Old   
Michael Wilcox
 
Posts: n/a

Default Re: external style sheets - 11-02-2003 , 05:41 PM






David K <dave (AT) geovino (DOT) net> wrote:
Quote:
connect to the first style sheet html document?
Could you explain this a little more?

Quote:
How can it tell the
other html documents what to do?
One statement alone in a document doesn't tell any other documents what to
do. Each document must have some sort of declaration to tell it what style
sheet to use.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com




Reply With Quote
  #3  
Old   
David K
 
Posts: n/a

Default Re: external style sheets - 11-02-2003 , 05:59 PM



Michael,

That makes sense to me, but when you name the external styles sheet with a
..css extension, how does it make the changes to the other html page. I'm
learning from a book called

PHP/MYSQL Programming for the absolute beginner.

Some of the explanation seems to miss something, or it's just me. I know
that the .css file and the html file have to be in the same folder, but just
can't understand how the Link rel connects the two documents.

Thanks
Dave



"Michael Wilcox" <mjwilcoCANTHAVESPAM (AT) yahoo (DOT) com> wrote

Quote:
David K <dave (AT) geovino (DOT) net> wrote:
connect to the first style sheet html document?

Could you explain this a little more?

How can it tell the
other html documents what to do?

One statement alone in a document doesn't tell any other documents what to
do. Each document must have some sort of declaration to tell it what style
sheet to use.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com





Reply With Quote
  #4  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: external style sheets - 11-02-2003 , 06:18 PM



David K pounced upon this pigeonhole and pronounced:

[top-posting fixed]
Quote:
"Michael Wilcox" <mjwilcoCANTHAVESPAM (AT) yahoo (DOT) com> wrote in message
news:uKfpb.2836$Oo4.1282 (AT) newsread1 (DOT) news.atl.earthlink.net...
David K <dave (AT) geovino (DOT) net> wrote:
connect to the first style sheet html document?

Could you explain this a little more?

How can it tell the
other html documents what to do?

One statement alone in a document doesn't tell any other documents what to
do. Each document must have some sort of declaration to tell it what style
sheet to use.

Michael,

That makes sense to me, but when you name the external styles sheet with a
.css extension, how does it make the changes to the other html page.
The browser reads the css file and applies the styles to the HTML.

Quote:
I'm learning from a book called

PHP/MYSQL Programming for the absolute beginner.
Since it's not an HTML/CSS book, it probably already assumes the reader
knows those subjects.

Quote:
Some of the explanation seems to miss something, or it's just me. I know
that the .css file and the html file have to be in the same folder, but just
can't understand how the Link rel connects the two documents.
The css file can be anywhere on your site. One common method of site
structure would be to group HTML documents by subject in appropriate
subdirectories. Stylesheets would also be in a subdirectory; /style is a
good choice.

Then all HTML documents link to it via relative links, such as:

<style type="text/css" media="screen, projection">@import
"../style/mainstyles.css"; </style>
<link type="text/css" rel="stylesheet" href="../style/printstyles.css"
media="print" />

--
-bts
-This space intentionally left blank.


Reply With Quote
  #5  
Old   
Big Bill
 
Posts: n/a

Default Re: external style sheets - 11-02-2003 , 10:38 PM



On Sun, 2 Nov 2003 14:59:20 -0800, "David K" <dave (AT) geovino (DOT) net> wrote:

Quote:
Michael,

That makes sense to me, but when you name the external styles sheet with a
.css extension, how does it make the changes to the other html page. I'm
learning from a book called

PHP/MYSQL Programming for the absolute beginner.

Some of the explanation seems to miss something, or it's just me. I know
that the .css file and the html file have to be in the same folder, but just
can't understand how the Link rel connects the two documents.

Thanks
Dave

Try doing a search for CSS tutorials. There are several of different
quality around but find one that suits you and you'll be away.

BB


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.