I'm trying to compose the layout shown at the picture. I want the layout cover the whole browser area.
My issue is that can not get the content be fixed to the footer. Even in case the browser resizes, the content div auto-adjust dynamically.
The class in the content div has its height to 100vh, but it exceeds and the window scroller comes up.
Then I use calc(100vh-100px) where 100px is the sum(headerHeight + footerHeight), but no success.
Is there anyway to accomplish this without jQuery?
EDIT:
HTML:
<div ng-app="app" layout="column" layout-fill ng-cloak>
<header>
<div class="main_header" ng-controller="headerCtrl as ctrl">
<img src="/img/Logo.png" width="300" height="60" alt="Logo" />
<div style="min-width:200px;width:60%" ng-controller="autocompleteCtrl">
<md-autocomplete class="search_box"
md-selected-item="selectedItem"
md-search-text="searchText"
md-items="item in querySearch(searchText)"
md-search-text-change="querySearch(searchText)"
md-item-text="item.value"
md-min-length="2"
md-autofocus="true"
md-no-cache="false"
placeholder="Search...." my-enter>
<md-item-template>
<span>{{item.value}}</span>
</md-item-template>
<md-not-found>
No matches found.
</md-not-found>
</md-autocomplete>
</div>
<div class="main_header_buttons_container">
<md-button class="md-raised md-primary" ng-click="showLoginPopup($event)" ng-show="!isSessionActive">Log in</md-button>
<md-button class="md-raised md-primary" ng-click="showRegisterPopup($event)" ng-show="!isSessionActive">Register</md-button>
<md-button class="md-raised md-primary" ng-click="closeSession($event)" ng-show="isSessionActive">Close Session</md-button>
</div>
</div>
</header>
<div class="main_body" layout="row">
<div ng-controller="sidebarCtrl">
<md-sidenav class="md-sidenav-left" md-component-id="left" md-is-locked-open="true">
<div layout="column" layout-align="start end" style="margin-top:50px">
<md-icon md-svg-src="/img/magnifying-glass-browser.svg" class="icon_search <?php echo $sidebar_option=='1'?'icon_search_selected':''; ?>" ng-click="<?php echo $sidebar_option=='1'?'':'change_menu(1)'; ?>"></md-icon>
<md-icon md-svg-src="/img/favorites_icon.svg" class="icon_favorites <?php echo $sidebar_option=='2'?'icon_search_selected':''; ?>" ng-click="<?php echo $sidebar_option=='2'?'':'change_menu(2)'; ?>"></md-icon>
<md-icon md-svg-src="/img/historical_icon.svg" class="icon_favorites <?php echo $sidebar_option=='3'?'icon_search_selected':''; ?>" ng-click="<?php echo $sidebar_option=='3'?'':'change_menu(3)'; ?>"></md-icon>
<md-icon md-svg-src="/img/collections_icon.svg" class="icon_favorites <?php echo $sidebar_option=='4'?'icon_search_selected':''; ?>" ng-click="<?php echo $sidebar_option=='4'?'':'change_menu(4)'; ?>"></md-icon>
</div>
</md-sidenav>
</div>
<md-content flex layout-padding class="remove-padding-around">
<div class="collections_content_area" layout="column" layout-fill layout-align="top left">
The content (blue area)
</div>
</md-content>
</div>
<footer>
<div layout="row" layout-align="center center">
<h4>My Awesome Footer</h4>
</div>
</footer>
CSS:
.main_header {
width: 100%;
height: 60px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
background-color: #F2F2F2;
}
.main_header_buttons_container {
width: 20%;
min-width: 250px;
text-align: center;
}
.main_body {
background-color: #CCC;
}
.collections_content_area {
height:98vh;
background-color: #ebeef0;
min-height:450px;
}
If I read it correctly, this is what you're after. flexbox (in combination with calc) is very useful to achieve layouts like these. See the code below.
body, html {
height: 100vh;
margin: 0;
}
.container {
height: 100%;
}
.top-bar, .foot-bar {
height: 50px;
}
.main-content {
height: calc(100% - 100px);
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-items: stretch;
align-content: stretch;
}
.side-bar, .main-bar {
height: 100%;
}
.side-bar {
width: 100px;
}
.main-bar {
overflow-y: scroll;
font-size: 20px;
width: calc(100% - 100px);
}
.top-bar {
background: green;
}
.side-bar {
background: red;
}
.main-bar {
background: darkred;
}
.foot-bar {
background: limegreen;
}
<div class="container">
<div class="top-bar"></div>
<div class="main-content">
<div class="side-bar"></div>
<div class="main-bar">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vero deserunt repellat asperiores optio esse et voluptas ad, autem possimus beatae labore nam natus, tempora expedita. Voluptatum optio architecto aut quas culpa magni, quis, sapiente tenetur quisquam nobis. Aliquam, nesciunt. Explicabo numquam ipsa saepe cupiditate temporibus amet ratione velit, repellat quaerat, tempore expedita eius sit aliquid neque impedit quia soluta repellendus architecto nihil ducimus, quas odio inventore consectetur nostrum. Enim eum voluptate veritatis hic quia nemo maiores a accusantium explicabo labore aliquid iusto autem iure sed blanditiis debitis dicta porro, dolore vero ut natus, obcaecati molestiae! Animi reiciendis dolorum officiis nostrum deserunt eaque nihil impedit natus placeat iusto aspernatur quae velit rem asperiores fugiat rerum, nobis pariatur. Recusandae itaque rem repudiandae placeat eum, delectus, facilis, provident, praesentium adipisci aut sed. Numquam dolorem ad, alias molestias illum iure. Obcaecati nam harum iure recusandae, voluptatem. Totam officia sit dolorem! Aliquam quod blanditiis, architecto placeat officia maxime, nam aliquid commodi nemo fugit fugiat, quis modi reprehenderit mollitia ducimus iusto! Illum cumque a aliquam, odit officia delectus iusto hic eligendi maiores laborum soluta fugiat nihil itaque quo iste quasi rem numquam. Tenetur asperiores odit dignissimos aliquam error, aliquid illum magnam eius libero. Vel, quae sint?Lorem ipsum dolor sit amet, consectetur adipisicing elit. Repellendus mollitia sapiente distinctio consequatur ab laboriosam corporis dignissimos facilis voluptatum odio, amet praesentium quisquam expedita nisi doloribus sunt! Voluptatum, aperiam, quae. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe facere aliquid fuga pariatur praesentium corporis recusandae, incidunt a cupiditate sint eum omnis adipisci rerum non! Accusantium quaerat ipsum, pariatur quae molestiae, culpa laborum! Obcaecati, laudantium provident aliquid asperiores repellat, distinctio quisquam earum, dolores quasi rerum facilis quaerat, minus aspernatur sapiente rem ipsum id. Temporibus eligendi, itaque quae aliquam, deserunt at veritatis sequi, ab cum molestias praesentium alias. Minima inventore, expedita quasi doloremque quod quis nostrum vero ullam velit. Voluptate totam magni ipsum corrupti, nobis, eveniet nesciunt veniam ipsa aut non nemo cumque dicta harum placeat mollitia. Aut libero reiciendis consequuntur.</div>
</div>
<div class="foot-bar"></div>
</div>
he is something i just made last night which make the footer fixed at bottom and ur body area can still be dynamic according to the contents in it
function main() {
var $window = $(window).outerHeight(true);
var $footer = $('.footer').outerHeight(true);
var $header = $('.header').outerHeight(true);
var $total = $window - ($header + $footer);
// .main is the content area
$(".main").css({
"min-height": $total + 'px'
// "min-height": 100 - ($total/100) + 'vh'
});
}
$(document).ready(function() {
main();
});
$(window).resize(function() {
main();
});
one thing to keep in mind that converting px to vh doesnt happen on the fly , not in css nor in js
Related
I'm trying to find a way to make an element resizable so that it will simultaneously reveal more of the element's content as the height increases while covering the content of the other element that it is taking space from.
An example of this is of Gmail's left sidebar, these two images show before and after the resize drag: Sidebar Before - Sidebar After
I was thinking it could be done with the CSS resize property, but while the lower element can be resized downwards, it won't resize upwards taking space from the above element, and the resize grabber also seems to be difficult to change its position from the bottom right to the top.
Thank you in advance.
You can use the resize property together with a flex setting that causes the other element to occupy the rest of the space.
html,
body {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
}
.container {
display: flex;
flex-direction: column;
height: 80vh;
margin:1em;
}
.container>div {
padding: 1em;
border: 2px solid rgba(0, 0, 0, 0.5);
overflow: auto;
}
.top {
resize: vertical;
height: 50%;
}
.bottom {
flex: 1;
}
<div class="container">
<div class="top">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fuga repellat laborum maxime ipsam sed quisquam, numquam eligendi doloribus non nisi unde vero deleniti velit dolore nesciunt error, sapiente provident at sint sunt! Cumque nostrum, placeat nisi,
minima, maiores molestiae quas praesentium mollitia hic natus suscipit nemo accusantium, beatae itaque rem aut omnis? Quisquam, natus dicta eveniet! Voluptates repellat, assumenda fugit. At, culpa quos nulla. Dolorem et modi quisquam velit quaerat
aspernatur iste natus eum magnam vero, id eius expedita quo placeat maiores enim quas iusto amet dolor ullam aperiam sequi laboriosam. Omnis voluptas, a exercitationem cum quidem quaerat ullam deleniti.
</div>
<div class="bottom">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet a magni culpa quidem in et facilis, ducimus voluptate explicabo saepe repellat, eius sequi molestias voluptatum! Maiores animi quasi quia nisi, pariatur id aperiam! Veritatis error molestias
minima modi suscipit ipsam eius sed perspiciatis est nobis illo, incidunt itaque harum, distinctio?
</div>
</div>
I am attempting to have text wrap onto the next line but instead of wrapping the text directly beneath the first line, have it wrap and begin at the far left of the viewport. Is this possible?
<div class="wrapper">
<p>some text</p>
<span> / </span>
<p class="some-long-text">this is an unnecessarily long string that will wrap to the next line on small devices</p>
</div>
.wrapper {
display: flex;
flex-direction: row;
flex-wrap: wrap;
> { display: flex; }
.some-long-text {
word-break: break-word;
white-space: inherit;
text-align: left;
}
}
This is essentially what I'm seeing:
It is possible. I think this might be what you are looking for.
.some-text {
display: inline;
}
.span-div {
float: left;
}
.slash {
padding: 0 1rem;
}
<span class="span-div"><p class="some-text">some text</p><span class="slash">/</span></span><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quam reprehenderit vel dolores, neque perspiciatis repellendus quasi assumenda, eaque incidunt totam at officiis qui, sunt facere eveniet aliquid optio, officia atque tenetur odit iste expedita. Est officia cum, nisi, voluptatum consequuntur veniam. Suscipit excepturi repellat, adipisci delectus, unde consequatur impedit amet vero voluptates minus voluptatum aut alias, quod. Quaerat doloribus numquam alias veniam fugiat, recusandae debitis ad atque ipsam esse sit nostrum, dignissimos accusamus facere minima reiciendis rem repellendus iusto, nesciunt perferendis sequi. Voluptatum nesciunt enim et explicabo, laudantium optio iusto expedita fugiat dolores, at debitis molestiae autem, eius totam incidunt!</p>
So the body of my page has some white space on each side, and I would like my header logo to be aligned on the left so that no matter what size the window is, it will vertically start at the same place the body does.
I can not figure out how because the body is centered, but has a percentage width, while my header logo is natively in the middle, and floating it to the left and adding a margin/padding (no matter if it is percentage or pixel) does not make it responsive to larger screens than my laptop.
The css for my container is:
.td-container {
width: 95%;
max-width: 1350px;
margin-right: auto;
margin-left: auto;
}
And so far for my header, I have tried:
.td-main-logo img {
max-width: 1350px;
margin-right: auto;
margin-left: auto;
}
and:
.td-main-logo img {
max-width: 1350px;
margin-left: 6%;
}
Body tag has margin around it. Try to reset it to "hide" white space.
CSS
body {margin:0}
Tips,
margin-left:auto and margin-right:auto is same as margin:auto
try to use box-sizing:border-box with padding (https://www.google.cz/search?q=box-sizing%20css)
LIVE EXAMPLE: http://codepen.io/anon/pen/oBMBax
(You haven't provided more informations)
What about this? I have changed the width to 600px just for demo purposes (same the outline)
.td-main-logo,
.td-container {
width: 95%;
max-width: 600px;
margin-right: auto;
margin-left: auto;
}
.td-container,
.td-main-logo{
outline: 1px solid red;
}
<div class="td-main-logo">
<img src="https://upload.wikimedia.org/wikipedia/commons/a/ab/Logo_TV_2015.png" width="100px">
</div>
<div class="td-container">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt nihil consequuntur, quasi dicta officiis distinctio, aliquid soluta provident tempore magni temporibus autem, facilis voluptatum ab blanditiis fuga tempora vel tenetur officia voluptate. Quaerat dolor magnam, dolore sint id ducimus ea optio rem nobis doloremque quam animi quidem veritatis assumenda commodi, ratione aspernatur. Ad nemo eos at quis quos saepe numquam, tempora blanditiis minus, pariatur soluta unde dolorem aut beatae esse nam, accusamus dolore rerum quam necessitatibus aspernatur explicabo doloremque. Quae rem error quia facilis deleniti asperiores excepturi numquam illum quo. Eius cupiditate laudantium molestiae ex ipsam perspiciatis, nam! Beatae tempora iure aliquid accusamus illum, adipisci? Ducimus praesentium commodi, aspernatur debitis voluptate omnis nemo quia illo magnam quis voluptates, ullam laborum tenetur dolorum ut. Molestias ex quas ea, excepturi praesentium error, natus ut quaerat porro, tenetur dolorum eaque exercitationem hic officiis repellat est suscipit dolor dolore velit. Doloribus rerum porro deserunt.
</div>
`
I've got a scrollable container. I want an overlay to stick to the bottom of this container, but it should only cover the contents of the scrollable area, it should not cover the scrollbar.
Desired result:
With my current solution the problem is that the overlay also covers the scrollbar.
I COULD solve the issue by setting pixel values for 'width' and 'right' of the overlay. But I don't want to have to do that.
.container {
position: relative;
border: solid 1px red;
height: 100px;
width: 200px;
float: left;
margin-right: 16px;
}
.scrollable {
height: 100%;
overflow-y: scroll;
}
.overlay {
position: absolute;
bottom: 0;
right: 0;
width: 100%;
height: 30px;
background: rgba(100, 200, 10, 0.5);
}
<section class="container">
<div class="scrollable">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur mollitia maxime facere quae cumque perferendis cum atque quia repellendus rerum eaque quod quibusdam incidunt blanditiis possimus temporibus reiciendis deserunt sequi eveniet necessitatibus
maiores quas assumenda voluptate qui odio laboriosam totam repudiandae? Doloremque dignissimos voluptatibus eveniet rem quasi minus ex cumque esse culpa cupiditate cum architecto! Facilis deleniti unde suscipit minima obcaecati vero ea soluta odio
cupiditate placeat vitae nesciunt quis alias dolorum nemo sint facere. Deleniti itaque incidunt eligendi qui nemo corporis ducimus beatae consequatur est iusto dolorum consequuntur vero debitis saepe voluptatem impedit sint ea numquam quia voluptate
quidem.
</div>
<div class="overlay"></div>
</section>
.container {
position: relative;
border: solid 1px red;
height: 100px;
width: 200px;
float: left;
margin-right: 16px;
}
.scrollable {
height: 100%;
overflow-y: scroll;
}
.scrollable p {
z-index:-2;
position:relative;
}
.overlay {
position: absolute;
bottom: 0;
right: 0;
left: 0;
width:100%;
height: 30px;
background: rgba(100, 200, 10, 0.5);
z-index:-1;
}
<section class="container">
<div class="scrollable">
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur mollitia maxime facere quae cumque perferendis cum atque quia repellendus rerum eaque quod quibusdam incidunt blanditiis possimus temporibus reiciendis deserunt sequi eveniet necessitatibus
maiores quas assumenda voluptate qui odio laboriosam totam repudiandae? Doloremque dignissimos voluptatibus eveniet rem quasi minus ex cumque esse culpa cupiditate cum architecto! Facilis deleniti unde suscipit minima obcaecati vero ea soluta odio
cupiditate placeat vitae nesciunt quis alias dolorum nemo sint facere. Deleniti itaque incidunt eligendi qui nemo corporis ducimus beatae consequatur est iusto dolorum consequuntur vero debitis saepe voluptatem impedit sint ea numquam quia voluptate
quidem.</p>
</div>
<div class="overlay"></div>
</section>
I checked your codes.
Please try it.
.overlay {z-index: -1;}
position:sticky; could be used :
(quotes from sitepoint introduction to sticky)
See position: sticky on Can I Use… for all the details.
Fortunately there a number of polyfills to choose from:
fixed-sticky by the Filament Group (requires jQuery)
position–sticky- by Matthew Phillips (Uses Modernizr for detection)
position: sticky, part of Philip Walton’s Polyfill.js library
position: sticky CodePen demo by Fabrice Weinberg (requires jQuery)
Stickyfill by Oleg Korsunsky (IE9+)
.container {
position: relative;
border: solid 1px red;
height: 100px;
width: 200px;
float: left;
margin-right: 16px;
}
.scrollable {
height: 100%;
overflow-y: scroll;
position: relative;
}
.overlay {
position: sticky;
bottom: 0;
right: 0;
width: 100%;
height: 30px;
background: rgba(100, 200, 10, 0.5);
}
<section class="container">
<div class="scrollable">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur mollitia maxime facere quae cumque perferendis cum atque quia repellendus rerum eaque quod quibusdam incidunt blanditiis possimus temporibus reiciendis deserunt sequi eveniet necessitatibus
maiores quas assumenda voluptate qui odio laboriosam totam repudiandae? Doloremque dignissimos voluptatibus eveniet rem quasi minus ex cumque esse culpa cupiditate cum architecto! Facilis deleniti unde suscipit minima obcaecati vero ea soluta odio
cupiditate placeat vitae nesciunt quis alias dolorum nemo sint facere. Deleniti itaque incidunt eligendi qui nemo corporis ducimus beatae consequatur est iusto dolorum consequuntur vero debitis saepe voluptatem impedit sint ea numquam quia voluptate
quidem.
<div class="overlay"></div>
</div>
</section>
Scrollbar is average 1em wide, you can give a try using only coordonates to size the width of this overlay.
.container {
position: relative;
border: solid 1px red;
height: 100px;
width: 200px;
float: left;
margin-right: 16px;
}
.scrollable {
height: 100%;
overflow-y: scroll;
}
.overlay {
position: absolute;
bottom: 0;
right: 1em;
left:0;
height: 30px;
background: rgba(100, 200, 10, 0.5);
}
<section class="container">
<div class="scrollable">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur mollitia maxime facere quae cumque perferendis cum atque quia repellendus rerum eaque quod quibusdam incidunt blanditiis possimus temporibus reiciendis deserunt sequi eveniet necessitatibus
maiores quas assumenda voluptate qui odio laboriosam totam repudiandae? Doloremque dignissimos voluptatibus eveniet rem quasi minus ex cumque esse culpa cupiditate cum architecto! Facilis deleniti unde suscipit minima obcaecati vero ea soluta odio
cupiditate placeat vitae nesciunt quis alias dolorum nemo sint facere. Deleniti itaque incidunt eligendi qui nemo corporis ducimus beatae consequatur est iusto dolorum consequuntur vero debitis saepe voluptatem impedit sint ea numquam quia voluptate
quidem.
</div>
<div class="overlay"></div>
</section>
screenshot in Chrome:
What should I expect? I expect the aside to grab the bottom of the viewport by 30px as you scroll down.
You need to run this in Firefox as it's the only browser that supports position: sticky.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
line-height: 1.5;
color: #fff;
padding: 3rem;
}
p {
padding: 30px;
}
img {
max-width: 100%;
display: block;
margin-bottom: 30px;
}
img:last-of-type {
margin-bottom: 0;
}
section {
background: #00ff7f;
max-width: 700px;
min-height: 1000px;
margin: auto auto 30px;
}
section:after {
content: '';
display: table;
clear: both;
}
article {
background: #1e90ff;
padding: 30px;
float: left;
width: calc(100% * 2 / 3 - 30px);
margin-right: 30px;
}
aside {
background: #ff6347;
float: left;
width: calc(100% * 1 / 3);
position: -webkit-sticky;
position: sticky;
bottom: 30px;
}
<section>
<article>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit, quas? Maxime dolore explicabo nostrum quidem suscipit eveniet libero quam voluptatibus, recusandae exercitationem assumenda voluptates nulla vel temporibus, fuga possimus dolores officiis veritatis quae maiores nisi impedit itaque? Quos optio libero, non nostrum iste, quo natus ex, eos sint itaque omnis? Illum eos, ducimus accusamus totam quasi consequuntur consectetur excepturi temporibus blanditiis aut laborum esse dolorum modi, explicabo illo eligendi cum architecto veniam?
</article>
<aside>
<img src="http://placekitten.com/404/404">
<img src="http://placekitten.com/404/404">
<img src="http://placekitten.com/404/404">
</aside>
</section>
<section>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur sunt, unde fuga, ex tempora nam molestiae autem maiores ducimus, debitis, impedit mollitia laboriosam! Nulla esse voluptatibus laudantium ipsa illo adipisci pariatur, nostrum perferendis quo saepe magnam, veritatis commodi doloribus inventore aspernatur cupiditate assumenda. Cupiditate porro dolorum quo magni ipsum adipisci sit repellendus dolore voluptatibus, omnis enim unde velit quidem expedita iusto modi maxime placeat reprehenderit dignissimos fuga ad atque soluta. Soluta velit natus qui ad hic suscipit dolorum vitae minus quisquam necessitatibus asperiores illum sed dolorem debitis, laborum, praesentium quos dicta molestiae. Iusto animi perferendis dignissimos ut necessitatibus nostrum earum pariatur velit reiciendis quibusdam veritatis neque saepe, mollitia, unde ab ipsam.
</p>
</section>
http://codepen.io/corysimmons/pen/adjabm?editors=1100
I expect the aside to grab the bottom of the viewport by 30px as you scroll down.
You're close. Sticky positioning means that the aside will hug the bottom of the viewport, but only when it would otherwise exceed the bounds of the viewport. Otherwise, it will behave like a regular, relatively positioned box. This is what distinguishes position: sticky from position: fixed — the latter means the box always hugs the bottom of the viewport, regardless of its surrounding layout and of the scroll position.
Because both your article and aside are floating, the aside element doesn't ever get pushed past the bottom of the viewport, and so it doesn't get a chance to stick to the viewport.
Removing the float declaration from the article element — thereby keeping it in the flow — allows it to push the aside beyond the viewport. Note that if the aside is taller than the viewport (depending on how you view the snippet), a bottom sticky position will scroll as far as it needs to get 30px (the value of bottom) away from the viewport before it begins to stick, after which it will scroll away once the bottom of its containing block (the section) exceeds 30px distance from the viewport.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
line-height: 1.5;
color: #fff;
padding: 3rem;
}
p {
padding: 30px;
}
img {
max-width: 100%;
display: block;
margin-bottom: 30px;
}
img:last-of-type {
margin-bottom: 0;
}
section {
background: #00ff7f;
max-width: 700px;
margin: auto auto 30px;
}
section:after {
content: '';
display: table;
clear: both;
}
article {
background: #1e90ff;
padding: 30px;
width: calc(100% * 2 / 3 - 30px);
margin-right: 30px;
}
aside {
background: #ff6347;
float: left;
width: calc(100% * 1 / 3);
position: -webkit-sticky;
position: sticky;
bottom: 30px;
}
<section>
<article>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit, quas? Maxime dolore explicabo nostrum quidem suscipit eveniet libero quam voluptatibus, recusandae exercitationem assumenda voluptates nulla vel temporibus, fuga possimus dolores officiis veritatis quae maiores nisi impedit itaque? Quos optio libero, non nostrum iste, quo natus ex, eos sint itaque omnis? Illum eos, ducimus accusamus totam quasi consequuntur consectetur excepturi temporibus blanditiis aut laborum esse dolorum modi, explicabo illo eligendi cum architecto veniam?
</article>
<aside>
<img src="http://placekitten.com/404/404">
<img src="http://placekitten.com/404/404">
<img src="http://placekitten.com/404/404">
</aside>
</section>
<section>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur sunt, unde fuga, ex tempora nam molestiae autem maiores ducimus, debitis, impedit mollitia laboriosam! Nulla esse voluptatibus laudantium ipsa illo adipisci pariatur, nostrum perferendis quo saepe magnam, veritatis commodi doloribus inventore aspernatur cupiditate assumenda. Cupiditate porro dolorum quo magni ipsum adipisci sit repellendus dolore voluptatibus, omnis enim unde velit quidem expedita iusto modi maxime placeat reprehenderit dignissimos fuga ad atque soluta. Soluta velit natus qui ad hic suscipit dolorum vitae minus quisquam necessitatibus asperiores illum sed dolorem debitis, laborum, praesentium quos dicta molestiae. Iusto animi perferendis dignissimos ut necessitatibus nostrum earum pariatur velit reiciendis quibusdam veritatis neque saepe, mollitia, unde ab ipsam.
</p>
</section>