I am trying to create a single line in HTML and CSS that look like
Released April 13, 1992. * Format Super Nintendo.
With the bullet point between the date and the format. How would I go about this? If I make this a List item it won’t display, it will drop the Format to a new line.(Because of it being a block level element.)
Hi,
You can hard code the bullet in the html using ```
•
Released April 13, 1992. • Format Super Nintendo.
Another way would be to use a span as display: inline-block; with a bullet background image. You can set dimensions using inline-block.
Taking @ronpat’s solution but in a pseudo element, just for the the semantics.
(Choosed monospace for a more accurate middle position.)
<!doctype html><html lang="en"><head><meta charset="utf-8">
<title>Untitled</title>
<style>
.format:before {
vertical-align:middle;
font:bold 1.5em/0 monospace; /* minimum line-height to not affect the paragraph's height */
content:"\2022"; /* the Unicode number for • */
}
</style>
</head><body>
<p>Released April 13, 1992. <span class="format"> Format Super Nintendo.</span></p>
</body></html>