Skip to main content
Inspiring
January 18, 2022
Answered

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

  • January 18, 2022
  • 2 replies
  • 410 views

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.

    This topic has been closed for replies.
    Correct answer Jon Fritz

    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

    2 replies

    Jon Fritz
    Community Expert
    Jon FritzCommunity ExpertCorrect answer
    Community Expert
    January 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

    Inspiring
    January 18, 2022

    Thank you. Have done.

    BenPleysier
    Community Expert
    Community Expert
    January 18, 2022
    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!