Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to Attach Stylesheet to Template (was: Newbie times 6, linking)?

Participant ,
Jan 18, 2022 Jan 18, 2022

I've managed to get the site just about to the point of uploading a test version, but before I do that I want to eliminate the css info in the pages themselves and link them to an external style sheet. I left it in the pages because there were a number of times that I needed to modify it before the whole set of child pages were complete. I'm prertty sure that it's not likely to change significantly from now.

 

I've saved out the css for each of my template pages. I am assuming that once I delet the <style> infor from the template and link it to the seperate css file in the css folder that when I save it it will update all the child pages. Is this correct?

 

So the main issue is; *how* do I link it. What is the proper format for doing that? I'm assuming that the link to the css file goes where the <style> info is now, but how much of a path do I need to specify? The template files, after all, are probably not going to be uploaded to the site, either for testing or when it goes public. Just the child pages, and the folder with the various css files.

335
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 18, 2022 Jan 18, 2022

1. You will need to create a .css file under File > New > CSS. That file will contain only your css. There will be no HTML tags whatsoever within it (not even <style> tags).

2. Save your new CSS file to your defined site
3. Open one of your .DWT files
4. Go to Tools > CSS > Attach Stylesheet
5. Browse to the new css file (leave "add as link" checked) and hit OK
6. Save your .DWT file and your Child Pages should update automatically

Translate
Community Expert ,
Jan 18, 2022 Jan 18, 2022

See https://www.w3schools.com/css/css_howto.asp

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 18, 2022 Jan 18, 2022

1. You will need to create a .css file under File > New > CSS. That file will contain only your css. There will be no HTML tags whatsoever within it (not even <style> tags).

2. Save your new CSS file to your defined site
3. Open one of your .DWT files
4. Go to Tools > CSS > Attach Stylesheet
5. Browse to the new css file (leave "add as link" checked) and hit OK
6. Save your .DWT file and your Child Pages should update automatically

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 18, 2022 Jan 18, 2022
LATEST

Thank you. Have done.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines