|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
CRAZY CSS & PHP Problem !!
this problem deals with using linking style sheets AND php includes at the same time.
it is kind of hard to follow. might be best to grab a sheet of paper to map this one out. here we go... i have a web site that uses PHP includes to deliver most of the content on the site. Ex: "index.php" includes "includes/navigation.inc.php" and "includes/titlebar.inc.php". These include files use linking style sheets that are in a different directory. Ex: { link href="css/links.css" rel="stylesheet" type="text/css" } This does not seem to work, however. It seems that the PHP includes do not call the stylesheets and when i try to link it from my index.php page, it still seems to do nothing. Am I doing something wrong here? Any kind of special syntax? Any correspondence or help would be GREATLY appreciated!! Going Crazy caleb caleb@jsoftintl.com |
|
#2
|
|||
|
|||
|
how about...
If it just doesn't like including the stylesheet, could you put those styles in a text file and call it something like links.inc and then include it as a php include rather than a css link?
like: <head> <?php include('css/links.inc'); ?> </head> <body> Navigation info </body> I had the same problem a while back and this is what solved it for me. Jen |
|
#3
|
|||
|
|||
|
Honestly, that is exactly how I do it, so I'm not sure what the problem could be. Is there a URL we could take a look at?
You can look at blamm.com to see mine in action...the header file is an include function which has the css link in it, which is a file within my "includes" directory. - jp |
|
#4
|
|||
|
|||
|
hope i'm not stating the obvious but...
where is the css directory located? if the include files call the css files then unless the css directory is a sub-directory of the include directory you may need to use: <link ....href="../css/links.css" /> good luck |
|
#5
|
|||
|
|||
|
calebdzahnd,
I know one small "quirk" between require ("css/links.css"); and Ex: { link href="css/links.css" rel="stylesheet" type="text/css" } In the include case the enclosing tags <style> ... </style> must be present. In the latter case the enclosing tags <style> ... </style> should not be present. Hope it helps. Robert
__________________
Robert --- If it's hard, it's probably wrong. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CRAZY CSS & PHP Problem !! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|