Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 05-25-2003, 08:04 AM   #1
Member (10 bit)
 
Join Date: Nov 2001
Posts: 610
Send a message via Yahoo to MSIuser
multiple css application

I got about 50 html pages that I want to apply a css style sheet to. Is there any easy way to do other than my current method of opening each individual page and then applying the sheet, cause it really takes a lot of time? I'm using Dreamweaver MX.

Thanks
David
MSIuser is offline   Reply With Quote
Old 05-25-2003, 09:38 AM   #2
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Nope.
mairving is offline   Reply With Quote
Old 06-01-2003, 06:07 PM   #3
Member (5 bit)
 
Join Date: Nov 2001
Location: The Crimson Permanent Assurance
Posts: 23
I would think Dreamweaver MX would have some function or other to add a style sheet to every page? If not, the why use it - Notepad is the way to go

Domhal
domhal is offline   Reply With Quote
Old 06-02-2003, 07:20 AM   #4
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
There are three ways to do a stylesheet, all of them involve editing each page. I believe DW has the ability to do a 'Search and Replace'. You could probably do a search like this:

Search for </head>

And replace it with this:
<LINK rel="STYLESHEET" type="text/css" href="/external.css">
</head>
mairving is offline   Reply With Quote
Old 06-03-2003, 12:08 PM   #5
Member (9 bit)
 
Join Date: Dec 1999
Location: Midland, NC, USA
Posts: 292
mairving,
I wouldn't do that with Dreamweaver. I seen tons of web pages where someone went in using DW and applied a stylesheet (using the
DW comments out the
Problem is, if you change the stylesheet, you have to go back and update every page that uses it.

Using Notepad to insert the code you used would be a heckuva lot cleaner. That way, if you change the stylesheet, the appearance of all the pages that use it are instantly changed.
UncaDanno is offline   Reply With Quote
Old 06-03-2003, 02:15 PM   #6
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Quote:
Originally posted by UncaDanno
mairving,
I wouldn't do that with Dreamweaver. I seen tons of web pages where someone went in using DW and applied a stylesheet (using the
DW comments out the
Problem is, if you change the stylesheet, you have to go back and update every page that uses it.

Using Notepad to insert the code you used would be a heckuva lot cleaner. That way, if you change the stylesheet, the appearance of all the pages that use it are instantly changed.
If you use an external stylesheet, you only have to change the stylesheet. Changing the stylesheet changes every page that it is linked to. If you used <style></style> tags, then you would have to change every single page.
mairving is offline   Reply With Quote
Old 06-04-2003, 10:24 AM   #7
Member (9 bit)
 
Join Date: Dec 1999
Location: Midland, NC, USA
Posts: 292
OOPS!! had to leave just after posting yesterday and didn't get to take a look at it until it was too late to edit and put in the "code" tags. Part of my post was missing.

I agree with you, using an external stylesheet, referenced by multiple pages, means you can change the stylesheet and the appearance of all the pages gets changed.

What the "missing" part of my post was talking about was that, if you use DW to change a page that references the stylesheet, DW in its infinite wisdom actually copies the stylesheet into the page and saves it there. Not a good thing. Later, you change the stylesheet and wonder why the change didn't take effect in the page you changed with DW. If you then open the page in DW, you see that DW commented out the LINK tags and copied the (old) source of the stylesheet into the page.

Sorry about the "partial" post before...
UncaDanno is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:00 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2