CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 25th, 2001, 01:13 PM
calebdzahnd calebdzahnd is offline
Just Another Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Middle America
Posts: 41 calebdzahnd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 17 sec
Reputation Power: 7
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

Reply With Quote
  #2  
Old July 25th, 2001, 03:06 PM
phreq phreq is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: New Zealand
Posts: 167 phreq User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 3 sec
Reputation Power: 8
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

Reply With Quote
  #3  
Old July 27th, 2001, 09:41 AM
johnp73 johnp73 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Dallas
Posts: 16 johnp73 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to johnp73
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

Reply With Quote
  #4  
Old July 27th, 2001, 08:04 PM
christeen christeen is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: sydney, australia
Posts: 68 christeen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 53 m 50 sec
Reputation Power: 7
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

Reply With Quote
  #5  
Old July 28th, 2001, 01:38 PM
rtaylor rtaylor is offline
Chretien & Trudeau gone - Good
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2001
Location: In a multi-cultural mess of failed peace-keepers.
Posts: 567 rtaylor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 43 sec
Reputation Power: 8
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CRAZY CSS & PHP Problem !!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway