Stylesheet not loading

Live Link

This is the head section:


<head>
<meta charset="utf-8">
<title></title>
<style media="screen" href="style.css" rel="stylesheet">
</style>
</head>

I am using index.php (instead of .html)→

Is your style.css in the same folder as your php file? If not, that’s how it would behave.

1 Like

Hi there,

I don’t recall having ever seen a <style> tag with an href attribute. Maybe try <link> instead?

No, that’s no valid and should be a link element as you mentioned:)

However I can’t see the css file here either.

http://html.trafficopedia.com/fclients/visa/style.css

There is one here for the clients/1 directory.

http://html.trafficopedia.com/clients/1/css/style.css

But I guess that’s not the right one?

1 Like

<off-topic>
Is there a reason your 1st line is blank? It is usual to have your Doctype as the first line.

Also, putting Applicant information in all caps is not advised as some screen readers will read it out letter by letter. You should use CSS to capitalise it.
</off-topic>

1 Like

This file is there sir.

I have deleted the blank space, but that didnt solve the issue.

Fixing everything deosnt make any difference.

Yes, thats not the tight one sir.

Are you sure it has the correct .css extension, not .CSS or anything else?

1 Like

Yes,

image

I don’t see where any of the selectors are targeting anything in the partial HTML in the image you posted.

Instead of an image, posting the HTML may help.

1 Like

It is now working.

1 Like

I tried with the full path and it works for me :slight_smile:

https://this-is-a-test-to-see-if-it-works.tk/assets/junk/index-001.php

1 Like

You have used Iframe here?

This is not the same file that you show in your screenshot. This file is 5K Bytes. The one in your screenshot is only 1KB.

From last 3 hours I am working on that. so its changing.

No iframe used.

Why do you think an iframe was used?

Did you view the source?

1 Like

No. sir.