I just began with CSS and HTML, and every time I go to my CSS file and try to create a style file for an id it just doesn’t apply I don’t know what the problem is. and tell me if you have any tips for me because I don’t know a lot I started a few days ago.
* {
box-sizing: border-box;
margin: 0;
padding: 0;
background-color: #24252A;
font-family: monospace, sans-serif;
font-weight: 500;
font-size: 16px;
color: #edf0f1;
}
li, a, button {
font-family: monospace, sans-serif;
font-weight: 500;
font-size: 16px;
color: #edf0f1;
text-decoration: none;
}
header {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 30px 10%;
}
.logo {
margin-right: auto;
}
.nav__links {
list-style: none;
}
.nav__links li {
display: inline-block;
padding: 0px 20px;
}
.nav__links li a {
transition: all 0.3s ease 0s;
}
.nav__links li a:hover {
color: #834bef;
}
button {
margin-left: 20px;
padding : 9px 25px ;
background-color: #834bef ;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease 0s;
}
button:hover {
background-color: #9a14f3;
}
#title {
font-size: 40px;
padding: 15px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Coin Counter</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="header">
<img class="logo" src="64x64.png" alt="image not found /:">
<nav>
<ul class="nav__links" id="nav__links">
<li><a href="about.html">about</a></li>
<li><a href="donate.html">donate</a></li>
<li><a href="index.html">home</a></li>
</ul>
</nav>
<a class="contact" href="#"><button>contact</button></a>
</header>
<hr>
<h1 id="title">Coin Counter</h1>
</body>
</html>
>Solution :
I think it’s working just fine… You have a #title styling which is applied to your tag (its font-size is 40px and has the 15px padding).