I am creating my first "from scratch" website, although I have edited and used html on several others. I have one elementary problem.
This has been my process. I used a template for a home page and it is called index.html. So this file is what I call up to view my current linked pages. I worked hard to make this page look good, and it has a logo banner on top (with horizontal menu) and two columns underneath: a "sidebar" on the left and wider
"content" on the right, and this is finally followed by a footer at the same width as the logo that simply copyrights the client and gives credit to the template author. Now I've created a dozen further pages
and they look great and all is well. However, I built each of these subsequent pages by copying the original index.html page. So of course, all the text for the logo, sidebar and footer appear as I first wrote it.
Suppose I want to change an item on the lefthand sidebar occasionally so it appears the same on every page and, for example, announces current events? As I see it now, I would have to go to each page to change the text because there is no place in the css for text. The css is for spacing and positioning and naming. Is there a way to create a spot in the css so my client can access it and make one change that affects text and would apply throughout all the pages?
I am hoping I can get pointed in a good direction instead of taking the time to re-invent the wheel. I've been reading articles and haven't found anything that answers this yet. I appreciate any ideas!
Some WYSWYG software for site management and web design can create templates that are automatically updated by changing only one file.
CSS are not meant to edit content, they are just for style.
If you know how to use a web programming language you can insert portions of code form external files. In PHP, for example, you can "include" a file into your code. Do that for many pages and when you edit the file you automatically edit the included portion of code for all of the pages that link to them.
There are some softwares for editing code that have an advanced "find and replace" tools and can look for a sample of code in many documents, replacing it with a new one.
I hope this helps
*Remember to share a link to your site and to rate the posts. This is a free service for you and for us.