Jump to content

Removing <base href="url"> stops calling a CSS with php extension.


Recommended Posts

I frequent a website that implements the social facebook plugin where it's position is fixed to the top of a page when a user scrolls down to read the content. I was curious how they were implementing it and checked out their code. I was able to implement the source code on my server and surprisingly was able to load the pages on my end as well; as if you were really browsing their site. Was wondering how that could be since I wasn't using their CSS, java, etc. 

 

I noticed they were using the <base href="url"> tag; and the CSS it was calling had a .php?v=1.0.0 extension. Now, I'm not the brightest when it comes to writing php scripts, but I do have a dynamic site running off of php a kind gentleman helped me with by writing the php code so I would only have to update the header.php and the footer.php when changes were being made. This has been easy for me to implement and get the hang of basic php scripting for dynamic sites using "include".

 

1. When I remove the <base href> tag, it doesn't load the templates.css.php which of course causes the menu, header, footer to not load correctly. I know its calling the base directory off of their site to load the CSS file. Is there a php file it could be calling that I'm not aware about?  

 

2. How can I implement this where it will call my own CSS files instead of calling upon theirs; for testing, I copied their templates.css.php file to my server. I then linked it to the css directory on my end and still the pages load incorrectly. Its only when I have their url set in the <base href> is when the pages load correctly. Hope this made sense.  

 

Thanks for the help!  

  

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.