I have a html (with bootstrap) and a CSS, and in my html I have an <hr>
tag which has a class, then in my CSS I have it styled with border. It is translucent, you can see the white, but it isn't "solid". I want it to be completely solid, and not like pale I guess.
body { background-color: #1b3b3c !important; color: white !important; }
.hr-left-bold {
border: 0.2rem solid #fff;
border-radius: 100rem;
width: 20rem;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<h3>Kérdés Cím</h3>
<hr class="hr-left-bold">
<p>Nem kéne így hagyni...</p>
<hr class="hr-left-bold">
<img src="./src/upvote.png" alt="like" class="img-fluid vote-img px-1">
<img src="./src/downvote.png" alt="like" class="img-fluid vote-img px-1">
Here's what it looks like:
I tried to style it with border-top, color, everything to be honest and nothing works.
Here's how I want it to look:
background: #fff
? <hr>
tag. Have you tried using a <div>
instead? You can set it's height: 0.2rem
and the background-color: #ffffff
. background: #fff
seems to work In newer bootstrap versions there are special "vertical rule" classes / rules which have some transparency.
To avoid that, add opacity: 1.0;
to your CSS rule.
body {
background-color: #1b3b3c !important;
color: white !important;
}
.hr-left-bold {
border: 0.2rem solid #fff;
border-radius: 100rem;
width: 20rem;
opacity: 1.0;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<h3>Kérdés Cím</h3>
<hr class="hr-left-bold">
<p>Nem kéne így hagyni...</p>
<hr class="hr-left-bold">
<img src="./src/upvote.png" alt="like" class="img-fluid vote-img px-1">
<img src="./src/downvote.png" alt="like" class="img-fluid vote-img px-1">