Can't vertically center text inside b-form-group
See original GitHub issueDescribe the bug
Having a form group which in some cases has plain text rather than a form-input. That text should be vertically centered:
<b-form-group label-cols="4" label-cols-lg="2" label="Default" label-for="input-default">
Password goes here
</b-form-group>
With plain Bootstrap 4, it is possible by setting align-self-center
for the parent node:
https://stackoverflow.com/questions/58353571/bootstrap-4-vertical-center-text-inside-horizontal-form-row
but in bootstrap-vue markup above there’s no such node.
The generated markup has the node, and applying the align-self-center
class in Inspector works:
<div class="col">Password goes here</div>
How to generate this markup?
<div class="col align-self-center">Password goes here</div>
Expected behavior
A way to apply a class to container node which holds the <b-form-group> content after the label.
Versions
2.0.4
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Vertical Align form-group bootstrap - Stack Overflow
@NenadVracar i want to aling my button inside of his column, for example the column have 400px of height, and i wish my...
Read more >Forms - Bootstrap
form-group class is the easiest way to add some structure to forms. It provides a flexible class that encourages proper grouping of labels,...
Read more >How to vertically center text with CSS ? - GeeksforGeeks
In this article, we will learn how to align the text vertically using CSS & Although CSS2 doesn't support Vertical aligning.
Read more >Bootstrap Vertical alignment - examples & tutorial
Bootstrap 5 vertical alignment utilities position elements on the y-axis. You can center your content with it or align it to the top...
Read more >[Best solution]-Bootstrap 3 vertical align in div doesn't work
It is top aligned, but unless you change the height it will look the same as middle or bottom aligned. What you have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks Troy!
Both solutions are good for the simplified request as posted. We need to display HTML, not just plain text though, and also a form control in same cases.
So I just went with a class applied on b-form-group:
Thanks for your support!
Thanks so much!