OscarDev
OscarDev

Reputation: 977

Align icon and two lines of text with materialize css

I need to align an icon with two lines of text, I am using MaterilizeCSS. This is my code but I can not solve it.

Any ideas?

        <div class="col s12 m3 center">
                <i class="material-icons">access_time</i> 
                <span>Horario</span><br>
                <span>Helper text</span>
        </div>

Attached picture to explain myself better

enter image description here

Upvotes: 0

Views: 145

Answers (1)

Xenio Gracias
Xenio Gracias

Reputation: 2758

.d-flex {
  display: flex
}

.text {
  flex-direction: column;
  margin-left: 10px;
}

.fa-map-marker.marker {
  font-size: 35px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="col s12 m3 center d-flex">
  <i class="fa fa-map-marker marker"></i>
  <div class="d-flex text">
    <span>Horario</span>
    <span>Helper text</span>
  </div>
</div>

Upvotes: 2

Related Questions