I've been trying yesterday to center vertically a "LinkedIn Connexion" div, with no success...
I've tried the "display: table" technique that I learned a few minutes ago but it still doesn't work... Can you help me find the issue ? I've learned Bootstrap last week and I've been having issues with all the "vertically centered" questions.
.div[title="Connexion LinkedIn"] {
display: table;
width: 100%;
table-layout: fixed;
}
#linkedin-block {
display: table-cell;
vertical-align: middle;
Background-color: #eceded;
padding: 30px;
border-radius: 10px;
text-align: center;
}
<div class="col-lg-4 col-lg-offset-2" title="Connexion LinkedIn">
<div id="linkedin-block">
<h4>Connectez-vous via LinkedIn</h4>
<a href="<%= url_for connexion_linkedin_path %>"> <%= image_tag "linkedin.png", :style => "width:50px; margin:20px" %></a>
</div>
</div>
----------- After SpaceBeers & Garrett comments ---------------------
I've tried all the suggestions, but it seams like none of them is working...
@SpaceBeers, as you can see in the photo bellow, there's an issue with your suggestions. It seams that, due to bootstrap, the line "top: 50%;" is not taken into account.
@Garrett, your help did something different, but I couldn't solve the issue yet. :S
I now think it's an issue due to Bootstrap, as it is what I'm using with :