Search
 
SCRIPT & CODE EXAMPLE
 

CSS

change the color of an hr

    hr {
        height: 1px;
        background-color: #ccc;
        border: none;
    }
Comment

how to change the color of the hr tag in html

<style>       
    hr{
        height: 1px;
        background-color: #ccc;
        border: none;
    }
</style>
Comment

add color to hr tag

<style>
/* Red border */
hr.new1 {
  border-top: 1px solid red;
}

/* Dashed red border */
hr.new2 {
  border-top: 1px dashed red;
}

/* Dotted red border */
hr.new3 {
  border-top: 1px dotted red;
}

/* Thick red border */
hr.new4 {
  border: 1px solid red;
}

/* Large rounded green border */
hr.new5 {
  border: 10px solid green;
  border-radius: 5px;
}
</style>
 
<h2>Style HR</h2>
<p>Default:</p>
<hr>
<p>Different styles of HR:</p>
<hr class="new1">
<hr class="new2">
<hr class="new3">
<hr class="new4">
<hr class="new5">
Comment

add color to hr tag

border: 1px solid red;
Comment

PREVIOUS NEXT
Code Example
Css :: how to give shadow to navbar 
Css :: set scroll bar on a table 
Css :: gradient text 
Css :: how to render css in flask link 
Css :: center position fixed element 
Css :: limit p css 
Css :: css transition all 
Css :: click through css 
Css :: css content space 
Css :: How to prevent text overflow 
Css :: how to center in absolute position 
Css :: css circle 
Css :: make text unhighlightable 
Css :: how to center an image element inside a block in css 
Css :: mettre une image au milieu css 
Css :: text decoration none 
Css :: how to create a semi circle in css 
Css :: css img scale-down 
Css :: resize logo html css 
Css :: css change image color 
Css :: css code to blur background 
Css :: Media query Tablet and smaller 
Css :: center in grid 
Css :: unselectable css property 
Css :: flex one whole width 
Css :: vertical-align tablerow 
Css :: center div horizontally 
Css :: limit text size 
Css :: how to verticaly align items in a HTML container 
Css :: transition prefixes css 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =