I am making a progress bar, I have a problem wanting to show the gray background. I can’t show it.
Could you please help me, I would also like not to use the current stylesheet and have my own that I can control.
<html>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<body>
<div class="w3-container">
<h2>Progress Bar</h2>
<div class="w3-light-grey" style="background-color:grey !important;">
<div class="w3-orange" style="height:24px;width:15%;float:left;border-radius:25px;"></div>
<div class="w3-orange" style="height:24px;width:15%;float:left;border-radius:25px;"></div>
</div>
<br>
<div style="float:left">
<p>Good!</p>
</div>
<div style="float: right;">
<p>Step 2 of 7</p>
</div>
</div>
</body>
2
Answers
You need to set the height of the progress bar as you did with the inner orange bars. Without it (or any content inside the div), the height is set to 0 and is invisible.
Use standard HTML unless you have a good reason not to. There is a
<progress>
element defined in the standard.