Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to draw a dotted line with css?

Tags:

html

css

How can I draw a dotted line with CSS?

like image 227
Kaveh Avatar asked Nov 17 '09 04:11

Kaveh


People also ask

How do you make a horizontal dotted line in CSS?

You could just have <hr style="border-top: dotted 1px;" /> . That should work.

Can you draw lines in CSS?

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.


1 Answers

For example:

hr {   border: none;   border-top: 1px dotted #f00;   color: #fff;   background-color: #fff;   height: 1px;   width: 50%; }
before <hr> after

See also Styling <hr> with CSS.

like image 111
Sinan Ünür Avatar answered Oct 05 '22 23:10

Sinan Ünür