I found a beautifully designed CSS header title on another website that I fell in love with. I want to replicate the same look, but without using CSS tables like they do on that website.
Here is an image of what I am aiming for: https://i.sstatic.net/qeoS7.jpg
The original design uses tables with vertical-align middle and an SVG image of a bullet point. I want to recreate the same effect using only HTML and CSS, without relying on tables.
This is my attempt so far:
.test::before {
display: inline-block;
font-size: 24px;
height: 30px;
line-height: 30px;
content: "●";
}
.test {
display: inline-block;
font-size: 18px;
height: 30px;
line-height: 30px;
}
.test::after {
display: inline-block;
background-color: #000;
width: 100%;
height: 1px;
line-height: 1px;
content: "";
}
<div class="test">Test</div>
You can view this codepen here: https://codepen.io/familias/pen/MWzEWPm
The line does not stretch to 100% width as intended, and the inline-block property doesn't seem to be working correctly either.
What is the most efficient and concise way (with the shortest code) to achieve this desired effect?