Style sheets and includes

User 2137031 Photo


Registered User
37 posts

I have a web page with an external sheet.

In my web page i have an include statement (i.e. <!-- include file=abc.inc -->) which contains the left side navigation html for my web page

The style sheet specs seem to work fine in the web page itself, but they don't seem to work at all on any of the statements in the included text.

Is this 'normal' behaviour?
User 122279 Photo


Senior Advisor
14,649 posts
Online Now

This is how I write includes:

<?php

include("filename.php");

?>


I use them a lot, and they work every time. The styles from the style sheet also affect the included bits. Of course the page that they are included in have to have the file extension .php instead of .html.

The style sheet has to be linked to in the head section like this:

<link rel="stylesheet" type="text/css" href="style.css" />
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.