-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accordion Btn-link center text sometimes. #29591
Comments
Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via CodePen/JS Bin or Stackblitz and report back with your link, Bootstrap version, and specific browser and OS details. This is an automated reply |
A live demo of this is at the following website... http://carers.axiam-pc.co.uk/join-us if you look at the website full screen on a big enough monitor you get the following image. However if you reduce the size of the screen down so that the words on the button start to wrap onto a second line then you get this effect... (in the second image the button with the wrapped lines has been centred, where as the buttons without the wrapped lines are left aligned making the centered button look wrong). Bootstrap version is v4.3.1 Browser is Chrome 78.0.3904.70 and OS is Windows 10, has also been tested on Apple iPad Safari and Android Chrome too with same result. |
Yeah, that's normal behaviour for inline elements. You can add We should also update this in our docs, feel free to contribute! |
ok thanks for that answer. Didn't actually think about adding text-left to it to fix it (to fix it on the main site I added the following CSS , also thanks for the advice about adding btn-block and I've just noticed that adding btn-block to it also fixes the alignment too without extra css/classes. |
Just had an issue on a website where I had an FAQ in an accordion. It was found that on smaller phone screens some of the FAQs were center aligned where as others were left aligned.
Found that btn-link was applying CSS of text-align:center but the link was set to display inline - therefore the text would only center when the FAQ went across multiple lines but would normally be left aligned at other times - problem can be seen in attached image.
The text was updated successfully, but these errors were encountered: