Issue
I started a project to learn HTML, CSS and JavaScript and coded a full HTML page but my navigator doesn't load images, FontAwesome icons, and it doesn't apply my css file (tried on Brave and Microsoft Edge navigator).
I removed the most part of the code, I just left the CSS and header of my code - Any ideas of what is causing me trouble?
* {
box-sizing: border-box;
font-family: 'Raleway', sans-serif;
background-color: #F2F2F2;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@100&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/fontawesome.min.css" integrity="sha384-jLKHWM3JRmfMU0A5x5AkjWkw/EYfGUAGagvnfryNV3F9VqM98XiIH7VBGVoxVSc7" crossorigin="anonymous">
<link href="/css/style.css">
<link href="/css/normalize.css">
<title>Booki</title>
<nav>
<a class="nav" href="#">Hébergement</a>
<a class="nav" href="#">Activités</a>
<nav>
<a href="#"><img src="/assets/logo/Booki.png"></a>
</head>
</html>
UPDATE: I found how to display the path wasn't correct,i just need to remove the slash at the start of the path, and it works !
Solution
Use body
tag to render your content on the page
<!DOCTYPE html>
<html>
<head>
...
<title>Booki</title>
</head>
<body>
<nav>
<a class="nav" href="#">Hébergement</a>
<a class="nav" href="#">Activités</a>
<nav>
<a href="#"><img src="/assets/logo/Booki.png"></a>
</body>
</html>
Answered By - Andrew Losseff
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.