Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

HR with two colors

HR with two colors


I'm trying to make an hr with two Colors on it, one dark red on the bottom and one orange on the top. An image is attached that gives an example of what I'm trying for. Is there any way to do this using pure CSS?

enter image description here

EDIT: If not, is there a way to set an hr to be an image? Like a png? Something that will stretch for different sizes?

Problem Courtesy of: noname


Use CSS with 2 borders like so:

hr {
     border-top: 1px solid gray;
     border-bottom: 1px solid white;

Example in JSFiddle.

And to mimic what you have in your picture with text floating on top of the HR, you can do something like this JSFiddle.

Solution courtesy of: Scott


View additional discussion.

This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

HR with two colors


Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription