2

For the life of me I can not figure out how to align the Month in Middle of the Arrows. The i class is font awesome. I have tried margin:auto, padding-top/padding bottom, line height etc. This should be easy. But it always ends up on the bottom.

div needs the style code...

 <div>
 <i class="fa fa-caret-left" style="font-size:35px"></i>
  NOVEMBER 2020 
 <i class="fa fa-caret-Right" style="font-size:35px"></i>
 </div>
Merle_the_Pearl
  • 1,391
  • 3
  • 18
  • 25

2 Answers2

0

use flexbox CSS.

div{
  border:1px solid black; 
  display:flex;
  justify-content: space-between;
  align-items:center;
}
<div>
 <i class="fa fa-caret-left" style="font-size:35px">-</i>
  NOVEMBER 2020 
 <i class="fa fa-caret-Right" style="font-size:35px">+</i>
 </div>
Dhruvi Makvana
  • 895
  • 5
  • 17
0

According to your question you just want the text in the middle? If so, just create a class within your div and use the below CSS.

HTML

  <div class = "sample">
 <i class="fa fa-caret-left" style="font-size:35px"></i>
  NOVEMBER 2020 
 <i class=" fa fa-caret-Right" style="font-size:35px"></i>
 </div>

CSS

  .sample {
   margin: auto;
  width: 50%;
  padding: 10px;
  text-align: center;
  
}
Mamdlv
  • 540
  • 8
  • 23