Topic: Button Fixed With
theotherguy
pro premium asked 7 months ago
Expected behavior When I replace the content of a button with less content I want the button to stay the same size. Actual behavior When I replace the html of a button with content, the button resizes to fit the content.
Resources (screenshots, code snippets etc.) $("#button").html("new");
Michal Szymanski
staff answered 7 months ago
It's natural and a desire to behave a button.
If you want to have a fixed width you need some additional CSS, for example:
<style>
.btn-fixed {
min-width: 70px;
min-height: 36px;
}
</style>
<button type="button" class="btn btn-primary btn-fixed"></button>
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB 5
- MDB Version: 1.0.0
- Device: any
- Browser: any
- OS: any
- Provided sample code: No
- Provided link: No