Hi, I am currently trying to web design with CSS. My Logo is not showing up despite performing
header {
background-image: url('Text.png');
background-size: center;
background-position: center;
background-repeat: no-repeat;
}
header {
background-image: url('Text.png');
background-size: center;
background-position: center;
background-repeat: no-repeat;
}
you just wanna invite me to your program that way I can help when I’m on
my friend has ownership. I just need to figure out if it is a syntax issue or a file issue, since im new to css.
header {
background-image: url(‘Text.png’);
background-position: center;
background-repeat: cover;
}
Is your friend on? If he is, tell me to invite me. I know Web dev the best
cant get ahold of him right now. Ill figure out the solution in the meantime, and if I can’t get it, ill lyk.
give me the link so i can fork it and see what I can do to fix it
yep, that is it thanks
Use code fences like this please, for readability purposes:
```css
header {
background-image: url(‘Text.png’);
background-position: center;
background-repeat: cover;
}
```
(Uses 2 spaces for indentation BTW.)
Found multiple problems:
There isn’t a semicolon after specifying the color in this CSS rule:
li, a, button {
font-family: "montserrat", sans-serif;
font-weight: 500;
font-size: 16px;
color: #cacfd3; /* Add a semicolon here */
text-decoration: none;
}
And a capitalization issue may also be affecting the image loading correctly.
header {
background-image: url("text.png");
background-size: center;
background-position: center;
background-repeat: no-repeat;
}
When you specified Text.png
, you did it with a capital T
. But, your image doesn’t have a capital T
, which is the reason it wasn’t loading correctly.
And probably the cause of this issue:
There’s no <header>
tag. I’m guessing you meant <h1>
, but that is up to you to decide.
Anyway, there are some other issues within your index.html
may cause some problems.
<DOCTYPE>
<h1>
is in <head>
<div>
's not within <body>
<head>
Yes, the site does work, but it is best practice to structure your website accordingly, especially if other developers are also working on the project.
I hope this fixes your problem.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.