Bootstrap: different elements' height if input group contains glyphicon button, Firefox 23.0.1

Created on 5 Sep 2013  路  8Comments  路  Source: twbs/bootstrap

Most helpful comment

The cause is "" first string. It must be set as writter above for html 5. If it doesn't exists or it has html 4 description ("PUBLIC etc") this error occurs.

All 8 comments

Note: the difference is [edit] very small [/edit], so zooming may be necessary to clearly observe the difference.

Not sure about 4px difference. Box model inspector says btn height is 35px, while form-control is 34px.

https://github.com/twbs/bootstrap/blob/4d4976fdcc3f2e88408a7993854a7cfbafd0c6ec/dist/css/bootstrap.css#L1719

input-group-btn-glyphicon

I have the same issue:

<div class="input-group"><input data-arp="false" name="dateOfBirth" type="hidden"><input id="dateOfBirth" class="form-control" type="text" data-validation="true" data-optionality="required" data-required-message="Value is required."><span class="input-group-btn"><button title="Show Calendar" type="button" class="btn btn-default"><span class="glyphicon glyphicon-calendar"></span></button></span></div>

yields:

register

But adding some text to the button:

<div class="input-group"><input data-arp="false" name="dateOfBirth" type="hidden"><input id="dateOfBirth" class="form-control" type="text" data-validation="true" data-optionality="required" data-required-message="Value is required."><span class="input-group-btn"><button title="Show Calendar" type="button" class="btn btn-default"><span class="glyphicon glyphicon-calendar"></span> Button </button></span></div>

yields:

register

Which is what I want ... without the extra text. For the moment I'm using a &nbsp;.

@hlship did you ever figure out why your buttons were doing that? I'm seeing the same behavior as your images in chrome and I don't see it in the bootply url above with the same markup I have locally. I set the line height of the glyphicon to inherit instead of 1 and it "fixed" it for me but thats obviously a bad solution.

I just (temporarily) added a   which fixes the element's height correctly.

Closing for #10936.

The cause is "" first string. It must be set as writter above for html 5. If it doesn't exists or it has html 4 description ("PUBLIC etc") this error occurs.

Adding solved the problem for me. Thank you katrazka!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

devdelimited picture devdelimited  路  3Comments

matsava picture matsava  路  3Comments

leomao10 picture leomao10  路  3Comments

ziyi2 picture ziyi2  路  3Comments

athimannil picture athimannil  路  3Comments