Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

line with css below each div [duplicate]

Tags:

html

css

line

I am trying to show a line below each div in a container. Instead of using <hr> tag every time, do we have option to handle this with css?

Html Code

#LinksContainer hr {
  border: none;
  height: 1px;
  color: #ccc;
  background-color: #ccc;
  text-align: left;
  width: 85%;
}
<div id="LinksContainer">
  <div><a href="#" target="_blank">Forum1</a></div>
  <hr/>
  <div><a href="#" target="_blank">Forum2</a></div>
  <hr/>
  <div><a href="#" target="_blank">Forum3</a></div>
  <hr/>
  <div><a href="#" target="_blank">Forum4</a></div>
  <hr/>
</div>
like image 277
Kurkula Avatar asked Mar 27 '26 05:03

Kurkula


1 Answers

You can add css attribute border-bottom: 1px solid grey; for example

Here is a syntax:

border-bottom: [border-width || border-style || border-color] | inherit
like image 127
user3127896 Avatar answered Mar 29 '26 20:03

user3127896