Allen Lawson Posted February 25, 2012 Share Posted February 25, 2012 Hello there! I was just wondering..Lets say you have a site with 50+ pages. And lets say you would like to add a new stylesheet, or your want the original one in a Folder called styles. How would you go about adding a new stylesheet without going into every page and changing it manually?Any answers / coding you can give would be great. Cheers! Link to comment Share on other sites More sharing options...
Don E Posted February 25, 2012 Share Posted February 25, 2012 I would go the route of using PHP and create a page called 'header.php' and inside that page has all the info for the header... like doc type.. scripts.. CSS files.. everything that goes in the <head></head>.. Then for each page for your site, you include that file: include("header.php"); Whenever you want to make changes to the header file, you just do it in one place and it takes effect for the whole site/pages. Same goes for footer as well incase you need to make changes for that, like the copyright year. Basically page will look like this: <?phpinclude("header.php");?> content here <?phpinclude("footer.php");?> Link to comment Share on other sites More sharing options...
dsonesuk Posted February 25, 2012 Share Posted February 25, 2012 You should be able to use @import to link to additional external styles within another. @import url('/css/style2.css'); Link to comment Share on other sites More sharing options...
Allen Lawson Posted February 25, 2012 Author Share Posted February 25, 2012 I thought I would use that... it seems a little, pardon my french, ghetto to do it like that. Link to comment Share on other sites More sharing options...
abdelkrim Posted February 25, 2012 Share Posted February 25, 2012 I have two problm:first problem, when i compil my site to the navigateur, at first time i have a " liste de repertoires" so i wont that automaticly the navigateur connect to the page .second problem, i wont to add a theme from a exemple site to my master page, so i wont to have the solution to this problem. Link to comment Share on other sites More sharing options...
dsonesuk Posted February 26, 2012 Share Posted February 26, 2012 No sorry! but you have a third problem, in that you should have posted your comment in its own new topic and not hijack someone else's topic which is totally irrelevant to your posting. Link to comment Share on other sites More sharing options...
knystrom18 Posted February 29, 2012 Share Posted February 29, 2012 You could just dig in and create an include, then write the call into all 50+ pages. Better to do it now than when you have 100+ pages. Copy/Paste is a wonderful thing. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.