How to style an hr element using CSS
Make money for being or staying online/internet.

You will get a $50 starting gift when you join using this code: Exode4LKrbujm1z and link:: GET THE OFFER NOW!!

In this post, you will learn how you can use the border property in CSS to style an hr element.

To make every thing easy we are just going to give each hr(horizontal line) element a class as shown in the code snippet below.

Watch the tutorial to follow STEP by STEP.

Hr (Horizontal Line) Mark Up
copy

<p>Default</p>
<hr>

<p>Styled ones</p>
<hr class="one">
<hr class="two">
<hr class="three">
<hr class="four">

Hr styling code

Here we select each hr element using the class given to each. For example one, two, three, four, respectively.

copy

hr.one{
	border-top:1px solid teal;
}

hr.two{
	border-top:1px dashed green;
}

hr.three{
	border-top:2px dotted red;
}

hr.four{
	border-top:5px solid teal;
	border-radius: 5px;
}
	

I will always put out free content on my YouTube Channel, but showing your support, subscribing to it, pushes me and gives me motivation, not because of the money, but because it feels like people really appreciate what I do. SUBSCRIBE TO:: Oston Code Cypher

Save up to 80% with this Domain & Shared Hosting package deal! 80% OFF - GET OFFER NOW

Related Post(s)

» Creating A Pure CSS Preloader - Source Code

» Learn how to create an overlay effect with CSS

» Learn how to use CSS box shadow property - Source Code

» Overriding The Default Text Selection Color With CSS

» CSS explained in a few lines

collections_bookmark Category :: Css
date_range Published :: 4 years ago At: 05:46 PM
event_note Detailed Date :: Nov 27th, 2019
person Writer :: Code
  • RECENT POSTS
1 month ago

Mr.

(sel


1 month ago

Mr.

(sel


1 month ago

Mr.

555


1 month ago

Mr.

555


1 month ago

Mr.

5550


1 month ago

Mr.

5550


1 month ago

Mr.

555


1 month ago

Mr.

555


Subscribe
  • ADVERTISEMENT

YOU MAY LIKE THESE POSTS

share