Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Styling the <hr /> element

Tags:

css

I am trying to make my <hr /> (hr) element pinkish, and am using the following css rule for this:

hr {height: 1px; color: #ed1d61;background-color: #ed1d61; } 

But there is still a black line showing through it.

(here is a look at it on the site that I am making: http://www.yemon.org/ , its the only horizontal line in the design.

How do i get the line uniform pink?

like image 986
Jelmar Avatar asked Feb 05 '11 17:02

Jelmar


People also ask

What is the output of an hr /> tag?

The <hr> tag in HTML stands for horizontal rule and is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections. The <hr> tag is an empty tag, and it does not require an end tag. Used to specify the alignment of the horizontal rule.

Can you style hr in HTML?

Its simple to add a horizontal line in your markup, just add: <hr>. Browsers draw a line across the entire width of the container, which can be the entire body or a child element. Originally the HR element was styled using attributes.

What HTML element is hr /> tag?

<hr>: The Thematic Break (Horizontal Rule) element The <hr> HTML element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.

How to style the <HR> element with CSS?

The <hr> element in HTML is used to create a horizontal line in the webpage. This horizontal line can be used for paragraph breaks or for other usages. In this tutorial, we will learn to style The <hr> element with CSS. The border property can be used to style the hr element. To change the color of <hr> element use background-color property.

What does <HR> mean in HTML?

<hr>: The Thematic Break (Horizontal Rule) element - HTML: HyperText Markup Language | MDN <hr>: The Thematic Break (Horizontal Rule) element The <hr> HTML element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.

What is the use of the <HR> element?

The <hr> element is most often displayed as a horizontal rule that is used to separate content (or define a change) in an HTML page.

How to change the shape of the HR element?

A favorite transformation on the HR element is to change the rotation. Rotate your HR element so that it's just slightly diagonal: Or you can rotate it so that it's completely vertical:


1 Answers

Change it to this:

hr {     height: 1px;     color: #ed1d61;     background: #ed1d61;     font-size: 0;     border: 0; } 
like image 199
Marwelln Avatar answered Oct 10 '22 04:10

Marwelln