Skip to main content

Number Headings - CSS

The counter function in conjunction with counter-* properties to number for headings.

DEMO

Metallica

Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut eum perferendis eius.

Megadeth

Debitis nemo dolores sit in nihil vero, necessitatibus eveniet labore velit numquam voluptatibus quia.

Slayer

Adipisci velit et similique earum quas illo odio rerum optio, quis, expedita assumenda enim.

Deep Purple

Picta aliquam porro maxime minima sed a ullam, aspernatur corporis.


HTML

<div class="listNum">
<h2>Metallica</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut eum perferendis eius.</p>
<h2>Megadeth</h2>
<p> Debitis nemo dolores sit in nihil vero, necessitatibus eveniet labore velit numquam voluptatibus quia.</p>
<h2>Slayer</h2>
<p>Adipisci velit et similique earum quas illo odio rerum optio, quis, expedita assumenda enim.</p>
<h2>Deep Purple</h2>
<p>Picta aliquam porro maxime minima sed a ullam, aspernatur corporis.</p>

CSS

body {
  counter-reset: heading;
}
.listNum h2:before {
  content: counter(heading)". ";
  counter-increment: heading;
}

Comments

Popular posts from this blog

Text Field in Webflow with Material Design Style

Custom Material Design text inputs, using a combination of native Webflow components and some simple HTML and CSS. You can clone the project here , thanks to Steven Hanley. Spent yesterday evening spinning up some @materialdesign text fields using a combination of the @webflow Designer and some simple HTML and CSS. Feel free to clone the project, customize to your liking, and use this component in your next design! ↳ https://t.co/Ti5fVj5V8t pic.twitter.com/KUi1uwW7X1 — steven hanley (@_stevenhanley) December 4, 2019

Image Text Wrap-Around - CSS

Text wrap around the image with shape-outside for visual flair! DEMO Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec quis commodo nulla. Etiam commodo, augue eu volutpat vehicula, ipsum diam tincidunt orci, vel imperdiet quam felis at ipsum. Nulla sit amet dolor eu neque interdum pretium id cursus metus. Quisque malesuada orci mattis risus sodales rhoncus. Quisque commodo sagittis enim quis molestie. Vestibulum tincidunt at erat a iaculis. Sed tristique diam eget quam mollis, at ullamcorper mi imperdiet. Phasellus sit amet rutrum nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec quis commodo nulla. Etiam commodo, augue eu volutpat vehicula, ipsum diam tincidunt orci, vel imperdiet quam felis at ipsum. Nulla sit amet dolor eu neque interdum pretium id cursus metus. Quisque malesuada orci mattis risus sodales rhoncus. Quisque commodo sagittis enim quis molestie. Vestibulum tincidunt at erat a iaculis. Sed tristique diam eget quam mollis, at u

Subject and Body Text to A Mailto Anchor - HTML

Adding the subject and body text to the mailto HTML tag is an easy way to help direct Emails when listing more than one e-mail address. DEMO Click Here to Email Us About Job Commission? HTML < a href = "mailto:name@email.com?subject=Job Commission&body=Hi friend, can you share me the list of job commission available." > Email Us About Job Commission ? </ a >