0

I have a paragraph inside div(class row in bootstrap) and i want to vertically center the text inside the paragraph but i cannot seem to do it.Here is my code and jsfiddle...

<div class="container-fluid">
<div id="footer" class="row">
    <p id="text" >TEXT</p>
    <img id="facebook" class="img-responsive pull-right" src="http://placehold.it/59x57" style="margin-bottom:15px;margin-right:15px;margin-top:15px;">
    <img id="adresa" class="img-responsive pull-right" src="http://placehold.it/59x57"  style="margin-bottom:15px;margin-right:15px;margin-top:15px;">
    <img id="poruka" class="img-responsive pull-right" src="http://placehold.it/59x57"  style="margin-bottom:15px;margin-right:15px;margin-top:15px;">
    <img id="telefon" class="img-responsive pull-right" src="http://placehold.it/59x57"  style="margin-bottom:15px;margin-right:15px;margin-top:15px;">
</div>

http://jsfiddle.net/T8Pjh/3/

Any help is appreciated!

Shile
  • 1,063
  • 3
  • 13
  • 30

1 Answers1

1

JSfiddle Demo

#footer {
    background:pink; /* for visual reference */
    display: table;
    width:100%;
}

#footer p {
    display: table-cell;
    vertical-align: middle;
}
Paulie_D
  • 107,962
  • 13
  • 142
  • 161
  • i tried this,and it does vertically center my text but now it leaves a bit of white space at the right side...half of it is from padding and half from margin.I set the padding to 0 and it resizes a bit but margin doesnt change even if i set it to 0 it always leaves a bit of white space. – Shile Jun 04 '14 at 22:33
  • also now i cant horizontally center my text. – Shile Jun 05 '14 at 00:02