Hi,
I am testing a PHP web site offline using XAMPP server application. The website runs great, but the only problem is that the .css is not running. The odd thing is that if I am online and I test the website locally the .css file works, but if I am offline the .css does not work.

I am new in web development, any ideas??

Thanks.

Recommended Answers

All 4 Replies

Hi.

How do you include the CSS file into your page?
Could we see the header of your page?

The css file is called like this:
<link href="<?= $GLOBALS; ?>style.css" rel="stylesheet" type="text/css">

Ok, and what is the value of $GLOBALS['glUrl']; ?
Or better yet, how does it look in the markup?

The problem is almost definitely that you are using an incorrect URI in the href of the <link> tag.
We need to see the actual URI it's trying to use.

I changed the URI directly to the .css file, eliminating the $GLOBALS;.
Problem solved, thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.