February 10, 200719 yr Hello to all, I am trying to get to grips with CSS. I have little problems when creating a new site from scratch, but where I am scratching my head is this. I have an existing site with say 100 (probably more) pages that I would like to attach a style sheet to. Is there any way I can do this without opening each individual page and making the appropriate link. I am using dreamweaver 8. Hope that you can save me a lot of hard work! Many thanks in advance. Glyn.
February 10, 200719 yr Hi Welcome to the forum, what I would do in Dreamweaver 8 - is a find and replace in files. Edit > Search & Replace > Find in Files - then navigate to your website folder - do a search on something like </title> - then do replace with: </title> <stylesheet here> That will go through all files and folders within your local website document and add the stylesheet link to all, then you can just simply upload. Another tip would be using includes. You would create a file called header.php - and in that insert all your <head><html> stylesheet etc data into it - then on all your web pages you create use a command <?php include '/path/to/header.php' ; ?> - this will insert all code within header.php into your document - so you only have to only change header.php next time and it will reflect on all files using that include. Saves time changing every file. Hope that helps.
Create an account or sign in to comment