I posted a project to GitHub and tried creating a live website using Pages. I got a 404 error at first and then when I added a README.md file. It reads the README.md file which is not what I want. I want it to read the actual website page. I assume the issue is the .DS_store file. Also, I used VS Code and posted to GitHub using GitHub Desktop.
GitHub link --> https://github.com/OkeraM/QR_Code_Component
Link to page --> https://okeram.github.io/QR_Code_Component/
QR.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="QR_styles.css">
</head>
<body>
<div >
<img src="./images/image-qr-code 1.png" >
<h2>Improve your front-end skills by building projects</h2>
<p>Scan the QR code to visit Frontend Mentor and take your coding skills to the
next level</p>
</div>
</body>
</html>
QR_styles.css
body {
background-color: hsl(212, 45%, 89%);
}
.QR_background {
background-color: white;
position: fixed;
top: 25%;
left: 50%;
margin-top: -50px;
margin-left: -180px;
width: 330px;
height: 500px;
border-radius: 5%;
}
.qr_image {
display: flex;
width: 300px;
height: 290px;
margin: 0 auto;
margin: 15px;
border-radius: 3%;
}
@import url('https://fonts.googleapis.com/css2?family=Outfit&display=swap');
h2 {
text-align: center;
font-family: 'Outfit', sans-serif;
}
p {
text-align: center;
font-family: 'Outfit', sans-serif;
font-weight: 400;
font-size: 15px;
opacity: .5;
}
CodePudding user response:
Whenever I post to github pages, it usually takes a moment to be able to view the site.
You can check the "Environments" tab in settings if you want to check if it has deployed
CodePudding user response:
you need to have an index.html in the root / folder, if you change QR.html to index.html it will work.