Cant get CSS stylesheet to connect to pages

7 replies
Hi Warriors,

I am doing a 'Silo' site that is good for SEO by using folders like this:

Property Clean Out Michigan, LLC.

But I cant seem to get the CSS and theme files to connect to the pages in the folders.

For example, the page seen here: Property Clean Out Michigan, LLC.

Should look the same here: Property Clean Out Michigan, LLC.

I used full path URLs on the pages in the folder back to the CSS files.

Any ideas?

Bret
#connect #css #pages #stylesheet
  • Profile picture of the author GowebMkt
    Wow.....I figured this out.....I put a full path pointing to an includes file, and I removed that.


    So the includes code now is: <?php include 'main-nav.php';?>

    and simply uploaded the main-nav.php file to that folder.....and it looks all good now.


    Thanks anyways!
    {{ DiscussionBoard.errors[10445753].message }}
  • Profile picture of the author 2WDHost
    Bret,

    There are still problems with the other pages of your site. Do you need assistance with this?
    {{ DiscussionBoard.errors[10446139].message }}
  • Profile picture of the author Big Squid
    Bret,

    Use this:

    PHP Code:
    <?php
      define
    ('CSS_DIR''http://www.propertycleanoutmi.com/css/');
    ?>
    Then when you want to call any css file, use:

    PHP Code:
    <?php include(CSS_DIR.'cssFile1.css'); ?>
    <?php 
    include(CSS_DIR.'cssFile2.css'); ?>
    That should fix your site.
    {{ DiscussionBoard.errors[10446546].message }}
    • Profile picture of the author GowebMkt
      Great to know....thanks BigSquid!
      {{ DiscussionBoard.errors[10446728].message }}
    • Profile picture of the author 2WDHost
      Big Squid,

      Is there a reason for including files using the remote address in this case?

      Originally Posted by Big Squid View Post

      Bret,

      Use this:

      PHP Code:
      <?php
        define
      ('CSS_DIR''http://www.propertycleanoutmi.com/css/');
      ?>
      Then when you want to call any css file, use:

      PHP Code:
      <?php include(CSS_DIR.'cssFile1.css'); ?>
      <?php 
      include(CSS_DIR.'cssFile2.css'); ?>
      That should fix your site.
      {{ DiscussionBoard.errors[10446913].message }}
      • Profile picture of the author Big Squid
        Originally Posted by 2WDHost View Post

        Big Squid,

        Is there a reason for including files using the remote address in this case?
        It's not a remote address. It's the local server.
        {{ DiscussionBoard.errors[10447068].message }}
        • Profile picture of the author 2WDHost
          For PHP that is a remote address. It will include the data using unnecessary HTTP requests which is a). slower, and b). can cause higher bandwidth counter values for hosting account
          Also, I cannot see the reason for using PHP at all to include CSS in this case instead of using HTML <link>.
          Originally Posted by Big Squid View Post

          It's not a remote address. It's the local server.
          {{ DiscussionBoard.errors[10447437].message }}

Trending Topics