CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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:18 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: 12
Crazy PHP and CSS Dilemma

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, 01:34 PM
jdk's Avatar
jdk jdk is offline
phpkid ~~~~~~ :o)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Nov 2000
Location: NJ, USA
Posts: 2,534 jdk User rank is Lance Corporal (50 - 100 Reputation Level)jdk User rank is Lance Corporal (50 - 100 Reputation Level)jdk User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 11 m 11 sec
Reputation Power: 15
Send a message via Yahoo to jdk
Post i think ..

i think there is something wrong regarding ur concept.

basically PHP is used to out put HTML.

now its upto u what HTML o/p to produce.

suppose that u r writing this

link href="css/links.css" rel="stylesheet" type="text/css"


then it will look for links.css as u have put in normal html page. it has nothing to do with PHP.

make sure that there is css directory under directory where PHP script is residing..

i think best approach would be to use absolute path for css file. that should work for sure,

jd
__________________
_____________________________
d.k.jariwala (JD)
~ simple thought, simple act ~
I blog @ http://jdk.phpkid.org

Reply With Quote
  #3  
Old July 25th, 2001, 03:41 PM
cdogg cdogg is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Washington, D.C.
Posts: 1 cdogg 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 cdogg
link your css/

Try creating a link for the absolute path and use that in your link to the stylesheet :

$path = "/home/sites/home/web/yoursite";

link href="<?php echo $path; ?>/css/links.css" rel="stylesheet" type="text/css"

That will solve the problem of incorrect paths.

It's really a matter of how you want your directory structure set up.

cheers -
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #4  
Old July 25th, 2001, 07:05 PM
thedanmichael thedanmichael is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 25 thedanmichael User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try cdogg's method with the include() function and include stylesheets written just as if they were embedded in the page.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Crazy PHP and CSS Dilemma

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap