The codes can be found at:
http://www.bootply.com/Z85ieOd2nu
I tried to create a row contains <h2> inlines with <button>. However, I found they are aligned weirdly in the result..
Does anyone have ideas about this? (How to align all of them in center vertically?)
-
try #center h2{margin-top:0px; margin-bottom:0px;}Suresh Ponnukalai– Suresh Ponnukalai2014年06月29日 09:37:33 +00:00Commented Jun 29, 2014 at 9:37
2 Answers 2
you can use line-height:70px; in CSS. assign the height of the .row (which in your case it is "70px") to button's CSS and you're done.
2 Comments
<h2>, it still looks not perfect.. bootply.com/C3sdH3WSMq# line-height to that or calculate the height based on the font size of h2Bootstrap gives top and bottom margins to h tags. Here also has top and bottom margins but does not have any margin ( that's why it is stuck to the top ).
To resolve this, either remove the margins from tag or provide top and bottom margin to the tag as(in this case):
button {
margin-top:20px;
margin-bottom: 10px;
}
Comments
Explore related questions
See similar questions with these tags.