I'm pretty noobish at CSS, but I've been playing around with Bootstrap 3 for a couple weeks. That said, I'm sorry if the question is too easy/repeated. I've searched around (both Google and Stackoverflow), but didn't find the answer to my issue (probably because I don't know how to query for it =/).
Thing is, I'm trying to have a link ( element ) that I want vertically aligned with a button (). Also, I want the button to be on the right of the container. Here's a fiddle that shows the issue:
<div class="row">
<a href=";">Text I want vertical-middle</a>
<button type="submit" class="btn btn-info pull-right">Button</button>
</div>
In the fiddle, I add the pull-right class to the button, and the elements are in the position I want them to be, but I wanted the link-text to be aligned with the button-text, but it doesn't matter what padding or margin I add to the element, I can't align them.
What I've tried to solve:
- Encapsulate both and elements in a div each, and set "float:right" to the latter, removing the pull-right class. (http://jsfiddle.net/66zbh/)
- Encapsulate in a div with col-md-8 and the , without the pull-right class, in a col-md-4, they get vertically aligned as I want them, but the button isn't pulled to the right
Thank you very much!