Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css hr thickness

hr {
  height: 5px;
  border: none;
  background-color: black;
}
Comment

how to set thickness of hr in html

hr {
  height: 4px;
}
Comment

how to change thickness of hr tag

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport"
          content="width=device-width,
                   initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible"
          content="ie=edge" />
    <title>Document</title>
    <style>
    div {
        width: 200px;
    }
     
    body {
        background-color: #f0f0f0;
        width: 80px;
        float: center;
    }
     
    hr.class-1 {
        border-top: 10px solid #8c8b8b;
    }
     
    hr.class-2 {
        border-top: 3px double #8c8b8b;
    }
     
    hr.class-3 {
        border-top: 1px dashed #8c8b8b;
    }
     
    hr.class-4 {
        border-top: 1px dotted #8c8b8b;
    }
     
    hr.class-5 {
        background-color: #fff;
        border-top: 2px dashed #8c8b8b;
    }
     
    hr.class-6 {
        background-color: #fff;
        border-top: 5px dotted #8c8b8b;
    }
    </style>
</head>
 
<body>
    <div>
        <hr class="class-1" />
        <br />
        <hr class="class-2" />
        <br />
        <hr class="class-3" />
        <br />
        <hr class="class-4" />
        <br />
        <hr class="class-5" />
        <br />
        <hr class="class-6" />
    </div>
</body>
</html>

<!--<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport"
		content="width=device-width,
				initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible"
		content="ie=edge" />
	<title>Document</title>
	<style>
	div {
		width: 200px;
	}
	
	body {
		background-color: #f0f0f0;
		width: 80px;
		float: center;
	}
	
	hr.class-1 {
		border-top: 10px solid #8c8b8b;
	}
	
	hr.class-2 {
		border-top: 3px double #8c8b8b;
	}
	
	hr.class-3 {
		border-top: 1px dashed #8c8b8b;
	}
	
	hr.class-4 {
		border-top: 1px dotted #8c8b8b;
	}
	
	hr.class-5 {
		background-color: #fff;
		border-top: 2px dashed #8c8b8b;
	}
	
	hr.class-6 {
		background-color: #fff;
		border-top: 5px dotted #8c8b8b;
	}
	</style>
</head>

<body>
	<div>
		<hr class="class-1" />
		<br />
		<hr class="class-2" />
		<br />
		<hr class="class-3" />
		<br />
		<hr class="class-4" />
		<br />
		<hr class="class-5" />
		<br />
		<hr class="class-6" />
	</div>
</body>
</html>
-->
Comment

how to change thickness of hr tag

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport"
          content="width=device-width,
                   initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible"
          content="ie=edge" />
    <title>Document</title>
    <style>
    div {
        width: 200px;
    }
     
    body {
        background-color: #f0f0f0;
        width: 80px;
        float: center;
    }
     
    hr.class-1 {
        border-top: 10px solid #8c8b8b;
    }
     
    hr.class-2 {
        border-top: 3px double #8c8b8b;
    }
     
    hr.class-3 {
        border-top: 1px dashed #8c8b8b;
    }
     
    hr.class-4 {
        border-top: 1px dotted #8c8b8b;
    }
     
    hr.class-5 {
        background-color: #fff;
        border-top: 2px dashed #8c8b8b;
    }
     
    hr.class-6 {
        background-color: #fff;
        border-top: 5px dotted #8c8b8b;
    }
    </style>
</head>
 
<body>
    <div>
        <hr class="class-1" />
        <br />
        <hr class="class-2" />
        <br />
        <hr class="class-3" />
        <br />
        <hr class="class-4" />
        <br />
        <hr class="class-5" />
        <br />
        <hr class="class-6" />
    </div>
</body>
</html>

<!--<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport"
		content="width=device-width,
				initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible"
		content="ie=edge" />
	<title>Document</title>
	<style>
	div {
		width: 200px;
	}
	
	body {
		background-color: #f0f0f0;
		width: 80px;
		float: center;
	}
	
	hr.class-1 {
		border-top: 10px solid #8c8b8b;
	}
	
	hr.class-2 {
		border-top: 3px double #8c8b8b;
	}
	
	hr.class-3 {
		border-top: 1px dashed #8c8b8b;
	}
	
	hr.class-4 {
		border-top: 1px dotted #8c8b8b;
	}
	
	hr.class-5 {
		background-color: #fff;
		border-top: 2px dashed #8c8b8b;
	}
	
	hr.class-6 {
		background-color: #fff;
		border-top: 5px dotted #8c8b8b;
	}
	</style>
</head>

<body>
	<div>
		<hr class="class-1" />
		<br />
		<hr class="class-2" />
		<br />
		<hr class="class-3" />
		<br />
		<hr class="class-4" />
		<br />
		<hr class="class-5" />
		<br />
		<hr class="class-6" />
	</div>
</body>
</html>
-->
Comment

PREVIOUS NEXT
Code Example
Css :: limit p css 
Css :: input type search remove x 
Css :: font awesome after css 
Css :: media queries w3schools 
Css :: click through css 
Css :: how to do a background blur in css 
Css :: how to cover entire div with background image 
Css :: vertically center an svg 
Css :: remove tailwind border in input fields or select 
Css :: alternatives to display none 
Css :: border: 1px solid black; 
Css :: center on page css 
Css :: make png image white css 
Css :: inner box shadow 
Css :: ion input change font size 
Css :: top down gradient css on body 
Css :: change input border color when selected 
Css :: Remove Or Hide Default Spinner Input Number 
Css :: box shadow css animation 
Css :: remove bootstrap button outline 
Css :: Media query Tablet and smaller 
Css :: grid center align css 
Css :: css click event jquery 
Css :: mat-progress-bar style without app-theme 
Css :: how to link fonts css 
Css :: table td remove padding 
Css :: css media two conditions 
Css :: posicionar div centro da tela 
Css :: rgba white color 
Css :: css checked 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =