How can I correctly format a bootstrap panel to not exceed the width of its parent div when the panel contents expand. I also want the panel to be responsive in that it shrinks and expands based on the browser window but I do not want overflow at the bottom of the page.
<div class="panel panel-info">
<div class="panel-heading"></div>
<div class="panel-body text-info">
//content that may expand or shrink
</div>
</div>
Related
Is there a possibility to give a bootstrap 4 col the width of its child, which is a container class?
<div class="container-fluid">
<div class="row">
<div class="col bg-secondary m-0 p-0">
text left
</div>
<div class="col-auto bg-primary">
<div class="container bg-primary m-0 p-0">
text mid
</div>
</div>
<div class="col bg-secondary m-0 p-0">
text right
</div>
</div>
</div>
I basically want to be able to put content on the left and right of a container, but I don't want my container to change in size because of this, because this left and right content won't be present on every page, and I want a consistent container width cross pages.
https://jsfiddle.net/5gt9uoqb/
Update:
Here's an image of what I would like to achieve: ibb.co/tcKM6S0 . At the bottom is a 'normal' page, with a centered container. This is a div with the standard container class that ships with bootstrap. At the top is a new page type I would like to create. It should have the exact same container like the other page, but I want to be able to put content in the grey zones, like, for example, some social icons (blue in the img). Wrapping the normal pages in a column too is not an option in my set up because of other stuff.
if you know about position property, then you can handle this issue without touching the container class.
For that, you need to a parent class of all child element. I mean after the body tag you take a class and give it position relative the which content you want to be left give it position absolute and left:0px;(you can space from left according to your), and if you want content right then you give it right:0px;
When using a template node and dynamically adding content, what is the best way to size the node? For example I have a dynamically sized div that I pass msg.payload.divInfo:
<div>
{{msg.payload.divInfo}}
</div>
Since the div has no height attribute, I only see one line of the info and have to scroll. If I set the height of the div statically:
<div style="height: 130px;">
{{msg.payload.divInfo}}
</div>
It shows all the content. If I try to set the height of the div by:
<div style="height: {{msg.payload.divHeight}}px;">
{{msg.payload.divInfo}}
</div>
I still only see one line.
The div cannot be static height.
How about
<div style="height:auto;">
</div>
or
<div style="height:auto; overflow:auto">
</div>
The idea is to make sidebar stay at the top when screen size is smaller than 1200px or so. When screen size is bigger than 1200px - affix sidebar should be fixed as user scrolls down a page. At the moment affix sidebar <div class="side-tool-panel" layout="column"> interferes with neighbour container <div class="content-wrapper" layout="row" layout-wrap>. How to make <div class="content-wrapper" layout="row" layout-wrap> to shift automatically and make up the room for <div class="side-tool-panel" layout="column">?
codepen
You can use the layout system of Angular Material to do that. Try this:
<div ng-app="MyApp" ng-controller="AppCtrl" class="dialogdemoBasicUsage" id="popupContainer" ng-cloak="" layout="column" layout-gt-md="row" layout-wrap>
<div class="side-tool-panel" layout="column" flex-gt-md="15"></div>
<div class="content-wrapper" layout="row" layout-wrap flex-gt-md="85"></div>
</div>
In this code I use layout-gt-md which width >= 1280px. Then, I use flex-gt-md in 2 children div. Here
Hope this help.
I have bootstrap container (div class="container") and there are two rows (div class="row").
But between those rows I need one full width horizontal line. Full width - I mean that it should be full width - outside container. This line is just for design issues, it would have background color and that is it. I do not know how to create it.
Divide your content into 2:
<div class="container">
<div class="row">
stuff here
</div>
</div>
<div class="line"></div>
<div class="container">
<div class="row">
stuff here
</div>
</div>
I have a slider that I need to fit its content within the bootstrap container. However, I want to put the pager outside the container. This is my logic but it doesn't work.
<div class="container-fluid"><!-- a wrapper for the slider and its pager -->
<div class="pager">
my pager content
</div>
<div class="slidercontent container"><!-- so that the slider content fits within the container area with the normal margins-->
my slider content
</div>
</div>
CSS:
.pager{
position:absolute;
left:-50px;
}
Can't see your code though...