Results 1 to 2 of 2

Thread: Linking to css file in include file

  1. #1
    Join Date
    May 2015
    Location
    Jurassic Coast
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Linking to css file in include file

    I would like to link to an external css file from with a php file that is included in another file.

    The main file is generic and has a header where css links are placed and the include file is a custom file
    and determined by conditions found by querying a database.

    Also - Can I include css in the include file without linking to an external css file?

    Thanks in anticipation.

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    All of this doesn't really mean much without seeing the files, but here are a few suggestions.

    I would like to link to an external css file from with a php file that is included in another file.
    You'd probably do this via a PHP echo;
    Code:
    echo '<link rel="stylesheet" href="/path/to/styles.css" />';
    Can I include css in the include file without linking to an external css file?
    Again, you'd probably do this via a PHP echo;
    Code:
    echo '<style>';
    echo 'selector { property: value; }';
    echo '</style>';
    If you need more help, please provide a zip of the files you're using.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. Resolved php random file include, can't find file
    By keyboard in forum PHP
    Replies: 7
    Last Post: 10-21-2011, 04:26 AM
  2. Problems linking swf file and xml file
    By spazzer in forum Flash
    Replies: 1
    Last Post: 03-11-2010, 01:33 AM
  3. Replies: 2
    Last Post: 11-24-2009, 08:53 PM
  4. linking to a swf file
    By web_mel in forum Flash
    Replies: 3
    Last Post: 05-07-2008, 06:05 PM
  5. how can we include php file within css file
    By manisha007 in forum CSS
    Replies: 4
    Last Post: 12-05-2006, 07:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •