2
I have a div with a text and an image:
This div has a block of text that should be aligned with the center. To make the alignment, I used the class .valign-wrapper
, that worked perfectly with the image. However, when applying the class, it only has effect on the image, ignoring the paragraph attached beside.
How can I align this block of text?
Structure of the DOM
<div class="valign-wrapper">
<div class="col s12 l6">
<div class="col s12 l5 center-align">
<p><img class="responsive-img circle" src="http://lorempixel.com/200/200/" alt="avatar"/></p>
</div>
<div class="col s12 l7 center-align valign-wrapper">
<p class="user">
<span>
<small class="message">Bem vindo,</small><br/> <strong id="user-name">Fulano da Silva</strong>
</span> <br/>
<span class="phone">(51) 9 9999 - 9999 </span><br/>
<span class="mail">[email protected]</span>
</p>
</div>
</div>
</div>
CSS used
.avatar p.user{
color: #455a64;
line-height: 102%;
margin-left: 0.2em;
}
span.phone, span.mail, small.message{
font-size: 12px;
word-wrap: break-word;
}
strong#user-name{
font-size: 16px;
}
.avatar img{
width: auto;
max-width: 7em;
height: auto;
}
which version of materialize?
– hugocsl
I’m using version 1.0.0
– Arthur Siqueira