0

When I load my page , I get an ERROR 403 message.

It seems that the browser cannot access the CSS file,

but in fact i don't have a CSS file.

My style is between the head tag:

GET https://s3-us-west-1.amazonaws.com/strong-lifts-5x5/stylesheet.css

<!DOCTYPE html>
<html lang="en">
<head>
    <title> New Responsive design web page </title>
    <meta charset="utf-8" />
    <link rel="stylesheet"  href="stylesheet.css" type="text/css" /> 
    <meta name="viewport"    content= "width=device-width , initial-scale = 1.0">
    <style>
         body {
            background-image: url(https://s3-us-west-1.amazonaws.com/strong-lifts-5x5/light-grey+5x5.jpg);
            color:#000305;
            font-size:89.5%; /* Base font size is 14px*/
            font-family: Arial, 'Lucida Sans Unicode';
            line-height:1.5;
            text-align:left;
            width: 99%;
            margin: 0 auto;
        }
    </style>
    </head>
4
  • The link tag in your head is attempting to load a css file named stylesheet.css Commented Dec 31, 2014 at 1:12
  • <link rel="stylesheet" href="stylesheet.css" type="text/css" > this will load the stylesheet.css. Commented Dec 31, 2014 at 1:14
  • Yes but if i delete it the page does't load and i get the message : This XML file does not appear to have any style information associated with it. Commented Dec 31, 2014 at 1:18
  • jsfiddle.net/ea9jb1du/1. No problem loading the stylesheet. Commented Dec 31, 2014 at 8:51

2 Answers 2

1

It is because this code: <link rel="stylesheet" href="stylesheet.css" type="text/css" /> if you do not have a stylesheet.css relative to your index page then it will give you an error. Remove that and you will be fine.

Sign up to request clarification or add additional context in comments.

4 Comments

when i remove it the page doesn't even load and i get this message instead: This XML file does not appear to have any style information associated with it. The document tree is shown below. <Error> <Code>AccessDenied</Code> <Message>Access Denied</Message> <RequestId>48652C2EC6A578E4</RequestId> <HostId> ppbIRii1/bMmf7hfL2V1XeJi0HqZr6N2NcXeWg2ZmQrhjBUTqwyptBH/EA/XMH+R </HostId> </Error>
Why is it xml file? Isn't it html? try moving the style part of the code up to under meta?
it doesn't work , i get the same error message if i delete <link rel="stylesheet" href="stylesheet.css" type="text/css" />
Try moving all the style code to stylesheet.css and actually have it. I'm not sure why you keep having the same error message (never had that before)
0

When you get 403 error, it means you don have permission to access it. For some reason your request is forbidden. For example, I had this problem with login. When I wasn't login my css wouldn't load. But when I logged in it works. You should check your htaccess configuration or anything where you can edit permissions for your project.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.