1
I know what central and center-block alignment is in bootstrap, but I’d like to know how to line up a picture to the right of a div? I’m unable to place the phone image next to the number, I have to leave the two numbers in the center of the page.
I’ll put the code in so you’ll understand better:
footer{ margin-top:20px;}
.telefone{ width:45%; float:left; margin-right:10%;}
.telefone img{ float:right; }
.telefone p{font-family: 'Oxygen', sans-serif; font-size:1.5em; font-stretch:normal; font-weight:bold; padding:5px; float:right;}
.whatsapp{ width:45%; float:left;}
.whatsapp img{ float:left; margin-right:10px;}
.whatsapp p{font-family: 'Oxygen', sans-serif; font-size:1.5em; font-stretch:normal; font-weight:bold; padding:5px;}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<footer class="container">
<div class="row">
<div class="col-sm-12">
<address>
<div class="telefone text-right">
<img src="imagens/telefone.png" class="img-responsive" />
<p>(85) 8743.1561</p>
</div>
<div class="whatsapp">
<img src="imagens/whatsapp.png" class="img-responsive" />
<p>(85) 8118-9716</p>
</div>
<div style="clear:both"></div>
<div>Av. Major Assis, 2315 - Vila Velha - Fortaleza - Ceará</div>
</address>
<address>
<strong>Full Name</strong><br>
<div class="glyphicon glyphicon-envelope"></div><a href="mailto:#">[email protected]</a>
</address>
</div>
</div>
</footer>
Have you tried the pull-right class ?
– Diego Zanardo
No longer aligned to the right?
– André Ribeiro
André Ribeiro no, the phone is on the side of the picture! so it’s wrong
– Luciano Oliveira Lima
In the P tag styles, try to put display:block-inline;
– Marcelo Gomes
Some of these answers answered him?
– Ricardo
Do you know you can accept answers? See tour. You can accept an answer per question you asked. You can even accept your answer if it was the one that helped you best.
– MateusDemboski