I am having a problem with my css and linking my images. My css is linking correct but I am having problem linking to the image. I am thinking it might be my folder structure.
Folder Structure:
index.html
(folder)images/ banner.png
(folder)styles/ style1.css
.banner {
background-image: url("banner.png");
height: 200px;
width: 1920px;
position: relative;
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles/style1.css">
<title>X</title>
<body>
<div class="banner"/>
</body>
</html>
Folder Structure:
index.html
(folder)images/ banner.png
(folder)styles/ style1.css
.banner {
background-image: url("banner.png");
height: 200px;
width: 1920px;
position: relative;
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles/style1.css">
<title>X</title>
<body>
<div class="banner"/>
</body>
</html>
Last edited: