HighDots Forums  

CSS Question

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss CSS Question in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Loopkit Pro v1.0
 
Posts: n/a

Default CSS Question - 02-11-2005 , 11:57 AM






I have multiple folders with multiple HTML files and each have their own CSS in them. Basically, I want to use one CSS file outside of all of them. Any help? _parent something like in Flash?

Reply With Quote
  #2  
Old   
Nancy Gill
 
Posts: n/a

Default Re: CSS Question - 02-11-2005 , 12:16 PM






Sure .. you can link to an external CSS sheet .. in fact, I prefer that to
inline CSS. Just open your document in Code view and select and cut the CSS
section .. then create a new CSS document and paste the CSS into it. You
will then have to select Attach Style Sheet option in the CSS panel and
attach the file to each page.

A little time consuming to have to do all of them .. but you will like
having CSS external a lot more for the future.


--
Nancy Gill
Team Macromedia Volunteer for Dreamweaver MX/UltraDev
http://www.macromedia.com/go/team/
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development

"Loopkit Pro v1.0" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I have multiple folders with multiple HTML files and each have their own
CSS in them. Basically, I want to use one CSS file outside of all of them.
Any help? _parent something like in Flash?




Reply With Quote
  #3  
Old   
Loopkit Pro v1.0
 
Posts: n/a

Default Re: CSS Question - 02-11-2005 , 01:21 PM



Any examples of this type of code would be super. From your input, I see that
it can be done. I have about 50 subfolders in the main folder that all need to
reference one main CSS file in the main folder itself.


Reply With Quote
  #4  
Old   
Nancy Gill
 
Posts: n/a

Default Re: CSS Question - 02-11-2005 , 02:39 PM



Wow! That's gonna take awhile.
Inline CSS usually all goes into the head of the document between style tags
so it's easy to find with each one. However .. you probably have duplicate
styles in your documents and you only want to have each unique style in the
external style sheet one time.

So do this .. start with your front page .. look at the code view and cut
the CSS. Then create a new document and select CSS as the type. Save it
as main.css or whatever you wish to call it and paste your front page style
into that. Then in the CSS Design Panel of DMX, click on the little icon in
the top right corner and find Attach Style Sheet in the dropdown menu.
navigate to the CSS sheet you created and select that. This will put a line
in your head of the page that links the style sheet to the page.

Now you will have to look at all your documents for styles that were not
contained in that page. You don't want duplicates, but you do want to have
every class. You may be able to use Find and Replace to find the styles for
you .. and once you have identified things, you surely could use find and
replace to strip the style tag out of the pages and replace it with the link
ref tag.

Good luck!


--
Nancy Gill
Team Macromedia Volunteer for Dreamweaver MX/UltraDev
http://www.macromedia.com/go/team/
Co-Author: Dreamweaver MX: Instant Troubleshooter (August, 2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development


"Loopkit Pro v1.0" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Any examples of this type of code would be super. From your input, I see
that
it can be done. I have about 50 subfolders in the main folder that all
need to
reference one main CSS file in the main folder itself.




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 - 2009, Jelsoft Enterprises Ltd.