Hi there! Recently, I’ve got strange outcome as on my HTML and CSS there should be buttons (play, stop, next, etc.). They do not show up on page. Couldn’t figure this out as I looked the Page Inspector from my Chrome Browser, StackOverFlow, even some tutorials.
Would love some support.
Here is the code of HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdnjs.cloundflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css">
<link rel="stylesheet" href="style.css">
<title>Music Player</title>
</head>
<body>
<div class="player-container">
<div class="img-container">
<img src="cover/numb.jpg" alt="album-art">
</div>
<h2 id="title">Numb</h2>
<h3 id="artist">Linkin Park</h3>
<audio src="music/numb.mp3"></audio>
<div class="progress-container" id="progress-container">
<div class="progress" id="progress"></div>
<div class="duration-wrapper">
<span id="current-time">0:00</span>
<span id="duration">3:00</span>
</div>
</div>
<div class="player-controls">
<i class="fas fa-backward" id="prev" title="Previous"></i>
<i class="fas fa-play main-button" id="play" title="Play"></i>
<i class="fas fa-forward" id="next" title="Next"></i>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
And here is the CSS code
@import url('https://fonts.googleapis.com/css2?family=Spartan:wght@400;700&display=swap');
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
background: #c9ced3;
display: flex;
justify-content: center;
align-items: center;
font-family: Spartan, sans-serif;
font-size: 12px;
}
.player-container {
height: 500px;
width: 400px;
background-color: #e7e7e7;
border-radius: 20px;
box-shadow: 0 15px 30px 5px rgba(0, 0, 0, 0.3);
}
.img-container {
height: 300px;
width: 300px;
position: relative;
top: -50px;
left: 50px;
}
.img-container img {
height: 100%;
width: 100%;
object-fit: cover;
border-radius: 20px;
box-shadow: 0 5px 30px 5px rgba(0, 0, 0, 0.5);
}
h2 {
font-size: 25px;
text-align: center;
margin: 0;
}
h3 {
font-size: 20px;
text-align: center;
font-weight: 400;
margin: 5px 0 0;
}
.progress-container {
background-color: white;
border-radius: 5px;
cursor: pointer;
margin: 40px 20px;
height: 4px;
width: 90%;
}
.progress {
background-color: #242323;
border-radius: 5px;
height: 100%;
width: 66%;
transition: width 0.1s linear;
}
.duration-wrapper {
position: relative;
top: -25px;
display: flex;
justify-content: space-between;
}
.player-controls {
position: relative;
top: -15px;
left: 120px;
width: 200px;
}
.fas {
font-size: 30px;
color: rgb(129, 129 129);
margin-right: 30px;
cursor: pointer;
user-select: none;
}
.fas:hover {
filter: brightness(80%);
}
.main-button {
font-size: 40px;
position: relative;
top: 3px;
}
/* For iPhone */
@media screen and (max-width: 376px) {
.player-container {
width: 95vw;
}
.img-container {
left: 29px;
}
h2 {
font-size: 20px;
}
h3 {
font-size: 15px;
}
.player-controls {
top: -10px;
left: 100px;
}
}