I'm working with Bootstrap in Vue and I have three b-tabs that I'm having trouble styling. Right now it does
this when the screen gets narrow. I don't want this. I want it to do this when the widow is resized. By inspecting the elements, I found this and that by unselecting flex-wrap:wrap, it does what I want it to.
I have added
.nav {
display: flex;
flex-wrap: nowrap !important;
}
To my style, but the display is still stacking the b-tabs when the screen narrows.
Any suggestions on how to override the Bootstrap styling?
I was able to achieve the desired result by adding a min-width to the styling to the parent container.
Related
Site URL: https://anthonysavarese.com/my-photos/
image of stacking buttons
Hi, how I can prevent the buttons in the link above from stacking on mobile? I'd like to have them center-aligned and on the same row.
I tried adding different pieces of CSS code I found online and none of them have solved it. I also tried adjusting the HTML tag from div to the other options and haven't had any luck.
display: flex is your best bet.
But you could also use display grid as an option. Below is a snippet using display flex.
#media (max-width:768px) {
.gutentor-element-button-group-wrap {
display: flex;
flex-direction: row;
justify-content: center;
margin-bottom:30px;
}
}
Adjust the 768px breakpoint to when you'd like the mobile view to trigger.
And the margin-bottom:30px is optional.
I added it to give you some space at the bottom.
If you want to learn more on display flex, here is a deeper dive into its logic. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout
I want to center div s inside a component without effecting styles of the div s inside that component . How could I do this ?
I am using angular 8 . Text align method effects the alignment of the text inside that div. I want to center elements while preventing that.
There's lots of ways to center a div and all can be done without impact on child elements. There's a really good list of ways described here:
https://css-tricks.com/centering-css-complete-guide/
For your case the easiest will likely be to add
display: flex; justify-content:center; align-items:center;
For additional help learning flexbox there's a fun game:
https://flexboxfroggy.com/
You can add styles to the component display: flex; justify-content: center
I am trying to remove the horizontal scroll bar that is appearing on the website that I am working on at Real Estate Website Scroll Bar Issue
I think it might be in the bootstrap.min.css file:
{.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}
But, that is a reference to a table. So I am not sure how to get rid of the scroll bar. Any help would be great. Thanks, Beth
You can either set:
body{
overflow-x:hidden;
}
Or fix what is causing the grid system to overflow. I see you are overriding the default bootstrap grid styles. I suggest you leave bootstrap to handle the rows and columns widths and paddings.
You have .row classes that are not a child of .container or .container-fluid. One is .containerNew -> .row and another is #about -> .row. Bootstrap requires .row be a direct child of .container or .container-fluid because .row has a negative left/right margin that works within left/right padding in .container and .container-fluid. So the negative margins on .row are creating the horizontal scrollbar.
You also have 2 #about sections - an ID can only exist on the page once.
I have put a demo of what I want to achieve with a flex layout here:
https://jsfiddle.net/airwalker/zjd730x7/
Essentially my layout works when using
{
display: inline-flex;
}
but not
{
display: flex;
}
In short I want the behaviour of the display: inline-flex where the container will resize to the child content but still be constrained with a max-width.
However I am using react-native which does not support the full flexbox specification, and does not support inline-flex.
What other way could I achieve my desired output using CSS?
Many thanks
How do i set a custom width to the dropdown list items in bootstrap 3.0.
I have a dropdown list, but the width of the items is usually the same size for all, and that size is determined by the longest item width.
Is it possible to customize the width and if the item words ar too long to fit, then wrap them?
you can do it just like you would without bootstrap:
ul{
width: 22px;
}
i just checked this version and it works.
if this doesn't work try adding !important, it should work
ul{
width: 22px !important;
}
Yes, You can customize everything in css and also in bootstrap framwork, when you used dropdown then take css automatic by bootstrap, you can also override this css. you can all css override with the help of "!important" property.
You can follow this mathod:
width : 100px; or width:100px !important
If width also not working then you can try min-width property.
min-width : 100px; or min-width:100px !important
ThankYou.