![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Now I am trying to work out how to best get the general HTML in each page to work with style sheets. I plan to have each web page call three style sheets. The first is the site wide CSS file in the main directory. The second will be the topic directory CSS file. The third will be the individual page CSS file. The names of these files will be generated and inserted in the web page automatically when they are created, based on the topic directory name (so topica.css to topicn.css), and the actual file name (file1.css, file2.css). In most cases, no actual file1.css or file2.css will exist, as the page will get all the styles it needs from the main.css and the topic.css style sheets. Any comments on this approach would be appreciated. We use PHP to generate pages on the fly. One of the header functions |
#3
| |||
| |||
|
|
I plan to have each web page call three style sheets. We use PHP to generate pages on the fly. One of the header functions outputs style elements. Without any parameters to the function it outputs just the main site CSS link (or @import), and a print CSS. When a page has extra style(s), the filenames are added to the function's parameter list and an additional @import is emitted for each filename. |
|
You seem to be creating a rather brittle structure for adding CSS files. It works for what you have now but will you always create a site with such a structure? If not, what you have now will not be easily reusable. |
|
Another possibility here is using PHP. It does not have to be a server-side runtime processor. The distribution includes an executable that takes the PHP files and outputs HTML. You then upload the finished product. |
![]() |
| Thread Tools | |
| Display Modes | |
| |