Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using flex to make the horizontal line vertical [closed]

Tags:

html

css

I have read that inside a flex container if we give an hr tag it will become vertical. I have tried the same, but not able to achieve. Am I missing something here ?

.outer-div {
  background-color: aqua;
}

.inner-div {
  display: flex;
  justify-content: space-between;
}
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<div class="outer-div">
  <div class="inner-div">
    <div class="details-div">
      <i class="fas fa-band-aid">I</i>
      <span>Get Details</span>
    </div>
    <hr />
    <div class="call-div">
      <i class="fas fa-band-aid">I</i>
      <span>Call Customer Care</span>
    </div>
  </div>
</div>
like image 432
dev Avatar asked Mar 01 '23 09:03

dev


1 Answers

It is working. Your element is just so short that it appears as a dot.

.outer-div {
  background-color: pink;
}

.inner-div {
  display: flex;
  justify-content: space-between;
  min-height: 100px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha512-Fo3rlrZj/k7ujTnHg4CGR2D7kSs0v4LLanw2qksYuRlEzO+tcaEPQogQ0KaoGN26/zrn20ImR1DfuLWnOo7aBA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<div class="outer-div">
  <div class="inner-div">
    <div class="details-div">
      <i class="fas fa-band-aid"></i>
      <span>Get Details</span>
    </div>
    
    <hr />
    
    <div class="call-div">
      <i class="fas fa-band-aid"></i>
      <span>Call Customer Care</span>
    </div>
  </div>
</div>
like image 167
isherwood Avatar answered Mar 05 '23 18:03

isherwood