Bulma fullheight layout with scrollable area in middle - css

I want to create a fullheight layout with a top navigation bar, middle area and footer. The Top Navigation and Footer should always stay at the top and bottom, respectively. The layout I managed to create looks somewhat like this:
I implemented this with:
<section class="hero is-fullheight">
<div class="hero-head">
<the-navbar></the-navbar>
</div>
<div class="hero-body">
<div class="container">
<dashboard/>
</div>
</div>
<div class="hero-foot">
<tab-navigation></tab-navigation>
</div>
</section>
The problem now is that when I have other elements than the <dashboard/> in the hero-body (like a long list of boxes) the fullheight layout is lost, making the site longer than the display height. How can I make the hero-body div scrollable? I tried adding overflow: auto; but that doesn't work

Apply height or max-height for hero-body and then apply overflow: auto;. May be you can hide overflow-x(overflow-x:hidden) and apply scroll only vertically by overflow-y:auto.

Related

extend div beyond bootstraps container

I have a set up in wordpress using bootstrap what follows:
<div class="container">
<div class="row">
<div id="NEEDS TO BE FULL WIDTH>
</div>
</div>
</div>
I would like the background of the "NEEDS TO BE FULL WIDTH" div be full browser width but not sure how. If I make it more the 100% width it makes a horizontal scroll. Any ideas?
You can have multiple .container elements inside your html. If you change the .container into a container-fluid the content of the container will take up 100%
If you only want the background to be full width, but you want the content to be constrained by the .container (at most about 1140 pixels wide) then surround the .container with another <div> and put the background-image on that element.

Extend background to right inside column inside a container in Boostrap 3

I'm working on a site using the Bootstrap 3.0 framework. I'm trying to get a kind of half border effect where there is a different background for the header and left navigation that wraps around the top and left of the page while the main content would have a darker background that extends from the left navigation infinitely to the right. I have the main content wrapped in a container and I know I'm able to extend backgrounds infinitely to the left and right by placing the content div inside of a div or other element and making that element's width 100% but how would I do this with a specific column that is already inside of a row? The main content is in a row that also has the navigation on the left. The site can be found here... http://jacobbuller.com/testsites/derekdavis/index.html
Please let me know if you have any suggestions!
--- EDIT ---
I'm trying to explain this a little clearer.
Here are two images showing what I have now and what I would like...
Basically I have a the header tag at 100% width and then inside of that I have the content wrapped in the container class to make sure it's center on the page. This way I can make the top header have a different background then the rest of the image. The rest of the page is made up of two columns wrapped in a container div. The problem I am having is making the background for the main col on the right expand 100% to the right. Here is what I would like it to look like...
I want the background of the main content col to extend 100% to the right to give the impression that it's being framed by the top header and left navigation.
Here is a short version of the header...
<header>
<div class="container">
<div class="row">
</div><!--End row -->
</div><!--End container -->
</header>
And the main content...
<div class="container">
<div class="equalHeights-sidenav"><!--equal heights JQuery so left nav is same width as main content -->
<div class="row">
<div class="sidebar-offcanvas col-xs-12 col-sm-3 col-md-3 col-lg-3">
</div><!-- End col -->
<div class="col-xs-12 col-sm-9 col-md-9 col-lg-9 content">
<div class="row"><!-- start main content row -->
</div>
</div>
There are more rows and col in the main content div but these are the two main divs surrounded it. Let me know what you think the best course of action is... if it's possible at all that is.

Bootstrap 3 - Scrollable content div

I'm using Bootstrap 3 and I'm trying to make a scrollable content DIV.
I have a grid with a left side navigation and a top bar and in the
middle I have the content that should be scrollable.
It works when I use a fixed height on the content div...but I want
to use 100% instead.
<div class="col-lg-12 col-md-12 col-sm-12" style="height:100%;overflow-y:auto;">
some content...
</div>
CSS:
html,body
{
height:100%;
overflow:hidden;
}
How could I get this to work with height:100%;
Thanks!
You can add pre-scrollable class for the div you want to scroll.
If you search the .css there is a max-height but you cant edit. So you have sure it will maximize the page in the window for that max value.
Hope it helps, i used the same for a one-page with scrollable divs.

Full width expanding div using 960 grid system?

How do you get a div that expands to the full size of the browser (no matter how you resize) while working with the 960 grid system? I can only think of something like this - but I don't like it because what if you have a background for the container_24 then you'd have to set it two times. The point is, I want everything else working under the container_24 even the text inside the full expanding div.
<div class="container_24">
<!-- stuff -->
</div>
<div style="width: 100%; background-color: gray;">
<div style="margin: 0 auto; width: 940px;">
Hello
</div>
</div>
<div class="container_24">
<!-- more stuff -->
</div>
Putting a z-index value on both the container and expanding div and having the z-index value for the expanding div larger than the container will lift it out. You then need to set the position of the expanding div to absolute and then it will expand out of the container. I'm sure there are some cases where this won't work/cut it though.

Help needed with DIV-layout for site

I am trying to build a page with the following in it:
Already have the following:
one div for page to center the whole page with width 809px
inside <div class="page"> is the following:
<div class="header">
<div class="container"> (container for content stuff)
<div class="footer">
What I am struggling with:
<div class="container"> should contain the following:
leftmost <div class="leftShadow"> with 100% height to container, with left shadow image as background for <div class="leftShadow">
second to left <div class="custom_content"> with 100% height to container (will contain content of page
second to right <div class="sidebar_right"> with 100% height to container (will contain extra links)
rightmost <div class="rightShadow"> with 100% height to container, with right shadow image as background for <div class="rightShadow">
So to summarise:
<div class="page">
<div class="header">header image</div>
<div class="container">
<div class="leftShadow"><img src="images/spacer.gif" alt="" /></div>
<div class="custom_content">(this is where the content would be)</div>
<div class="sidebar_right">(some other links)</div>
<div class="rightShadow"><img src="images/spacer.gif" alt="" /></div>
</div>
So what is supposed to happen is, when either custom_content or sidebar_right div's strength in length below the other, the other one would stretch in height to be the same with as the longer div. Obviously, both side div's (leftShadow and rightShadow) should also stretch to 100% of the container's height.
Can someone please guide me in the right direction? Basically, these div's should behave much like a table would when one td's content stretches beyond the height of the other td's.
Don't use divs like tables!
The leftShadow and rightShadow divs are completely unnecessary. Combine your background images into a single image and set it as the background of your container div.
To make sure the background image fills the height of the container, set background-repeat: repeat-y.
Why not use something like "Faux Columns"?
See http://www.alistapart.com/articles/fauxcolumns/
Perhaps you won't need the leftShadow and rightShadow divs: take a look at faux columns.
This is what you are looking for, I hope. :)
I'd do this differently because you're not going to get your divs to behave like tables.
I'm not entirely sure what you're wanting this to look like, but I'm guess you want some sort of shadow image down the left and right side of the container div. How about removing the leftShadow and rightShadow divs, put a repeatable background image on the content div of width 809px (and maybe height 1, depending on what your shadow image looks like). Also perhaps set overflow:hidden on the content div - if I remember rightly thats a kind of hack which will make the containing div stretch in this situation.

Resources