Slider that overflows parent and page - CSS only - css

Is is possible to create a slider that would "overflow" parent elements and body?
The idea would be to have content of section inside a container.
Slider would also be a part of that section but the slides would overflow parent element and body.
Vertical scroll would be wide as container but you could see slides outside of the container.
h2{
text-align: center;
}
.container{
margin: 0 auto;
max-width:460px;
border: 2px solid #ef34ed
}
.slider{
display: flex;
align-items: center;
jusify-content: flex-start;
overflow-x: scroll;
}
.slide + .slide {
margin-left: 50px;
}
.slide{
text-align: center;
}
<div class="section">
<div class="container">
<div class="row">
<h2>Some title</h2>
<div class="slider">
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
<p>Name</p>
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
<p>Name</p>
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
<p>Name</p>
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
</div>
<p>
Magna phaedrum electram pro an. Te nec delectus temporibus, omittantur ullamcorper ne pri. Pri ad affert urbanitas, laboramus eloquentiam pri ad. Purto summo interpretaris eam et, brute dolore ut eam, illud dolore putent et vim. Ei sed aliquip iudicabit, te fabulas menandri sed.
</p>
</div>
<div>
</div>

Hope this is what you are looking for.
h2{
text-align: center;
}
.container{
margin: 0 auto;
max-width:460px;
border: 2px solid #ef34ed;
overflow: visible;
}
.slider{
display: flex;
align-items: center;
justify-content: flex-start;
overflow-x: scroll;
padding:0 calc(calc(100vw - 460px)*0.5);
margin:0 calc(calc(100vw - 460px)*-0.5);
}
.slide + .slide {
margin-left: 50px;
}
.slide{
text-align: center;
}
<div class="section">
<div class="container">
<div class="row">
<h2>Some title</h2>
<div class="slider">
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
<p>Name</p>
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
<p>Name</p>
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
<p>Name</p>
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
<div class="slide">
<img src="https://via.placeholder.com/150" alt="person" />
</div>
</div>
<p>
Magna phaedrum electram pro an. Te nec delectus temporibus, omittantur ullamcorper ne pri. Pri ad affert urbanitas, laboramus eloquentiam pri ad. Purto summo interpretaris eam et, brute dolore ut eam, illud dolore putent et vim. Ei sed aliquip iudicabit, te fabulas menandri sed.
</p>
</div>
<div>
</div>

Related

How to set column wrap in bootstrap 4

-> how to set column in responsive view this type of structure. i want one by one column i have attachment screenshot what i want in bootstrap 4 for ipad view. i want one column than second column.
#import url('https://fonts.googleapis.com/css?family=Merriweather:300,300i,400,400i,700,700i,900,900i|Rubik:300,300i,400,400i,500,500i,700,700i,900,900i');[![enter image description here][1]][1]
body {
font-size: 15px;
line-height: 28px;
font-family: 'Rubik', sans-serif;
font-weight: 400;
}
.video-thumb .video-icon {
width: 35px;
height: 35px;
background-color: rgba(0,0,0,.9);
position: absolute;
bottom: 0;
left: 0;
z-index: 1;
}
.thumbnail-main, .video-content {
margin-bottom: 20px;
}
img {
max-width: 100%;
}
.inner-content span {
display: block;
margin-bottom: 10px;
text-transform: uppercase;
font-size: 10px;
font-weight: 500;
letter-spacing: 1px;
line-height: 12px;
}
.inner-content a.link {
color: #208385;
}
h5 {
font-size: 14px;
line-height: 22px;
font-weight: 700;
}
section {
padding: 100px 0;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<section>
<div class="container">
<div class="row align-items-center">
<div class="col-md-4 thumbnail-main">
<a href="https://www.google.co.in/">
<div class="postion-relative">
<img src="http://placekitten.com/1000/500" alt="">
</div>
</a>
</div>
<div class="col-md-8 video-content inner-content">
<span class="date">10 Oct 2018</span>
<span class="cat-tag">
<a class="link" href="https://www.google.co.in/">Breast</a>
</span>
<a href="https://www.google.co.in/">
<h5>Lorem ipsum dolor sit amet, consecte sicng elit, sedt ut labore et dolore mag aliqua laboabor.</h5>
</a>
</div>
<div class="col-md-4 thumbnail-main">
<a href="https://www.google.co.in/">
<div class="postion-relative">
<img src="http://placekitten.com/1000/500" alt="">
</div>
</a>
</div>
<div class="col-md-8 video-content inner-content">
<span class="date">10 Oct 2018</span>
<span class="cat-tag">
<a class="link" href="https://www.google.co.in/">Breast</a>
</span>
<a href="https://www.google.co.in/">
<h5>Lorem ipsum dolor sit amet, consecte sicng elit, sedt ut labore et dolore mag aliqua laboabor.</h5>
</a>
</div>
</div>
</div>
</section>
Bootstrap columns can only have 12 columns in one row, in your example you have 4 div's with 4, 8, 4, 8 columns.
What you need to do is the following:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<section>
<div class="container">
<div class="row align-items-center">
<div class="row col-md-4 col-lg-12">
<div class="col-lg-4 thumbnail-main">
<a href="https://www.google.co.in/">
<div class="postion-relative">
<img src="http://placekitten.com/1000/500" alt="">
</div>
</a>
</div>
<div class="col-lg-8 video-content inner-content">
<span class="date">10 Oct 2018</span>
<span class="cat-tag">
<a class="link" href="https://www.google.co.in/">Breast</a>
</span>
<a href="https://www.google.co.in/">
<h5>Lorem ipsum dolor sit amet, consecte sicng elit, sedt ut labore et dolore mag aliqua laboabor.</h5>
</a>
</div>
</div>
<div class="row col-md-4 col-lg-12">
<div class="col-lg-4 thumbnail-main">
<a href="https://www.google.co.in/">
<div class="postion-relative">
<img src="http://placekitten.com/1000/500" alt="">
</div>
</a>
</div>
<div class="col-lg-8 video-content inner-content">
<span class="date">10 Oct 2018</span>
<span class="cat-tag">
<a class="link" href="https://www.google.co.in/">Breast</a>
</span>
<a href="https://www.google.co.in/">
<h5>Lorem ipsum dolor sit amet, consecte sicng elit, sedt ut labore et dolore mag aliqua laboabor.</h5>
</a>
</div>
</div>
</div>
</div>
</section>
I surrounded the cards within a div, that contains a row with col-md-4 and col-lg-12. This will show a card at tablet and smaller, but if larger then a tablet it will show it in a row. Don't know if this is what you mean, i hope it helps :)!

How to set the height of the box remains the same even though the description changes? (Css)

I get reference from here :
https://getbootstrap.com/docs/4.0/components/jumbotron/
https://coreui.io/demo/#base/jumbotron.html
My script like this :
<template>
<div class="wrapper">
<div class="animated fadeIn">
<b-card>
<b-row v-for="row in formattedClubs">
<b-col v-for="club in row" cols>
<b-jumbotron header="" lead="">
<b-link to="#">
<b-img v-on:click="add(club)" thumbnail fluid src="https://picsum.photos/250/250/?image=54" alt="Thumbnail" />
</b-link>
<b-link href="#" class="card-header-action btn-close">
{{club.description}}
</b-link>
<p>{{club.price}}</p>
<p>{{club.country}}</p>
<div class="text-center my-3">
<b-btn variant="primary">Add</b-btn>
</div>
</b-jumbotron>
</b-col>
</b-row>
</b-card>
</div>
</div>
</template>
<script>
export default {
name: 'jumbotrons',
data () {
return{
clubs: [
{id:1, description:'chelsea is the best club in the world and chelsea has a great player', price:1000, country:'england'},
{id:2, description:'liverpool has salah', price:900, country:'england'},
{id:3, description:'mu fans', price:800, country:'england'},
{id:4, description:'city has a great coach. Thas is guardiola', price:700, country:'england'},
{id:5, description:'arsenal player', price:600, country:'england'},
{id:6, description:'tottenham in london', price:500, country:'england'},
{id:7, description:'juventus stadium', price:400, country:'italy'},
{id:8, description:'madrid sell ronaldo', price:300, country:'spain'},
{id:9, description:'barcelona in the spain', price:200, country:'spain'},
{id:10, description:'psg buys neymar at a fantastic price', price:100, country:'france'}
]
}
},
computed: {
formattedClubs() {
return this.clubs.reduce((c, n, i) => {
if (i % 5 === 0) c.push([]);
c[c.length - 1].push(n);
return c;
}, []);
}
}
}
</script>
<style scoped>
.jumbotron {
padding: 0.5rem 0.5rem;
}
</style>
The result view like this :
Based on the image above, it can be seen that each box has a different height. This is due to different lengths of description
How do I make it so that the height of all the boxes is the same even though the length of description is different?
You should use Cards instead of Jumbotrons, then you can simply use the card group.
https://getbootstrap.com/docs/4.0/components/card/#card-groups
They will all have the same size.
<div class="card-group">
<div class="card">
<img class="card-img-top" src="..." alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
<div class="card">
<img class="card-img-top" src="..." alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
<div class="card">
<img class="card-img-top" src="..." alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
Vue-Bootstrap also supports card groups with equal size as you can see here https://bootstrap-vue.js.org/docs/components/card/#card-groups
Not used vue before but you can handle the css using flexbox.
.Wrapper {
display: flex;
flex-wrap: wrap;
}
.Item {
background: #f5f5f5;
display: flex;
flex: 0 1 180px;
flex-direction: column;
text-align: center;
margin: 10px;
padding: 5px;
border: 1px solid #ddd;
}
.ImgWrap {
position: relative;
background: #fff;
flex: 0 1 180px;
width: 100%;
display: block;
overflow: hidden;
}
.ImgWrap img {
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.Description {
flex:1;
padding: 10px 0;
font-size: 0.9em;
word-wrap: break-word;
}
.Price,
.Country {
background: #eaeaea;
border: 1px solid #ddd;
border-radius: 3px;
margin: 2px 0 10px 0;
padding: 5px;
color: #8a8a8a;
}
.Btn {
background: #20a8d8;
border: none;
border-radius: 3px;
color: #fff;
padding: 10px;
}
<div class="Wrapper">
<div class="Item">
<div class="ImgWrap">
<img src="https://picsum.photos/250/250/?image=54" alt="Thumbnail">
</div>
<div class="Description">
<p>This is some descriptive text.</p>
</div>
<p class="Price">800</p>
<p class="Country">England</p>
<input class="Btn" type="submit" value="Add">
</div>
<div class="Item">
<div class="ImgWrap">
<img src="https://picsum.photos/250/250/?image=54" alt="Thumbnail">
</div>
<div class="Description">
<p> dapibus congue odio placerat quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sagittis, ante ac vulputate malesuada, nunc ex lobortis.</p>
</div>
<p class="Price">800</p>
<p class="Country">England</p>
<input class="Btn" type="submit" value="Add">
</div>
<div class="Item">
<div class="ImgWrap">
<img src="https://picsum.photos/250/250/?image=54" alt="Thumbnail">
</div>
<div class="Description">
<p>Nam accumsan aliquet congue. Quisque orci tortor, ullamcorper a auctor sit amet, luctus non ante. Proin rutrum purus quis tellus pulvinar, at tincidunt odio sagittis. Nam aliquet risus sit amet suscipit dictum. Sed sed porta urna. </p>
</div>
<p class="Price">1000</p>
<p class="Country">England</p>
<input class="Btn" type="submit" value="Add">
</div>
<div class="Item">
<div class="ImgWrap">
<img src="https://picsum.photos/250/250/?image=54" alt="Thumbnail">
</div>
<div class="Description">
<p>Nam accumsan aliquet congue. Quisque orci tortor.</p>
</div>
<p class="Price">700</p>
<p class="Country">England</p>
<input class="Btn" type="submit" value="Add">
</div>
<div class="Item">
<div class="ImgWrap">
<img src="https://picsum.photos/250/250/?image=54" alt="Thumbnail">
</div>
<div class="Description">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus non pellentesque elit, sit amet placerat nisl. Quisque hendrerit risus nisl, vel dignissim est congue in.</p>
</div>
<p class="Price">600</p>
<p class="Country">England</p>
<input class="Btn" type="submit" value="Add">
</div>
</div>
Just use h-100 on the Jumbotron...
<b-col v-for="club in row" cols>
<b-jumbotron header="" lead="" class="h-100">
<b-link to="#">
<b-img v-on:click="add(club)" thumbnail fluid src="https://picsum.photos/250/250/?image=54" alt="Thumbnail" />
</b-link>
<b-link href="#" class="card-header-action btn-close">
{{club.description}}
</b-link>
<p>{{club.price}}</p>
<p>{{club.country}}</p>
<div class="text-center my-3">
<b-btn variant="primary">Add</b-btn>
</div>
</b-jumbotron>
</b-col>
This is all that is needed since the cols inside the row are the same height (based on the height of the tallest). Bootstrap 4 uses flexbox.

How to make a background image of one section to show little over second section?

Here is my PSD
I want to make this image exacly to go little below to second section. Here is my HTML look that i have made till now.
Its not going below as i dont know what will be its css. I think i have to change css of hero background class.. may be overflow or something else. Any one can help me to resolve my problem ? BY the way this hero image is seperate image.. let me show you the picture.
Below is the html code of the first and second section.
<div class="hero-background">
<!-- Navigation bar -->
<div class="navbar-fixed">
<div class="nav-wrapper">
<nav>
<div class="container">
<a href="#" class="brand-logo hide-on-small-only">
<img class="resonsive-img" src="img/logo.png"/>
</a>
<i class="material-icons black-text">menu</i>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a class="white-text" href="#howItWorks">How it works</a></li>
<li><a class="white-text" href="#aboutUs">About</a></li>
<li><a class="white-text" href="#faq">FAQ</a></li>
<li><a class="white-text" href="#contact">Contact</a></li>
<li><a class="waves-effect waves-light btn stack-btn" href="#stack">Earn more</a></li>
</ul>
</div>
</nav>
</div>
</div>
<ul class="sidenav" id="mobile-demo">
<a href="#" class="brand-logo sidenav-close">
<img class="resonsive-img" src="img/logo.png"/>
</a>
<li><a class="mobile-menu-text sidenav-close" href="#howItWorks">How it works</a></li>
<li><a class="mobile-menu-text sidenav-close" href="#aboutUs">About</a></li>
<li><a class="mobile-menu-text sidenav-close" href="#faq">FAQ</a></li>
<li><a class="mobile-menu-text sidenav-close" href="#contact">Contact</a></li>
<li><a class="waves-effect waves-light btn stack-btn sidenav-close" href="#stack">Earn more</a></li>
</ul>
<!-- End Navigation bar -->
<!-- Hero section -->
<section id="hero">
<!-- Desktop & tablet version -->
<div class="row valign-wrapper hide-on-small-only" style="padding-top: 10%; height: 100vh;">
<div class="col s12">
<div class="container">
<h2 class="hero-title1">Earn more effortlessly</h2>
<h5 class="hero-title5">Stack boosts your wealth by automatically investing your excess cash</h5>
<a class="waves-effect waves-light btn stack-btn" href="#howItWorks">Show me how</a>
</div>
</div>
<div class="right" style="overflow: hidden; display: inline-block; padding-bottom: 5%">
<img class="resonsive-img" src="img/macbook.png"/>
</div>
</div>
<!-- Mobile version -->
<div class="col s12 hide-on-med-and-up" style="padding-top: 30%">
<div class="container">
<h2 class="hero-title1">Earn more effortlessly</h2>
<p class="hero-title5"><b>Stack boosts your wealth by automatically investing your excess cash</b></p>
<a class="waves-effect waves-light btn stack-btn" href="#howItWorks">Show me how</a>
</div>
</div>
</section>
</div>
<!-- End Hero section -->
<!-- How It Works section -->
<section id="howItWorks">
<div class="container">
<div class="section-heading">
<h2 class="center-align">How It Works</h2>
</div>
<div class="row">
<div class="col l6 m12 center-align">
<row>
<i class="large material-icons howItWorks-icon">device_hub</i>
</row>
<row>
<div class="howItWorks">
<h5>Seamless Connection</h5>
<p>Grow your Stack by connecting your bank account and creating your investment profile in just two minutes.</p>
</div>
</row>
</div>
<div class="col l6 m12 center-align">
<row>
<i class="large material-icons howItWorks-icon">trending_up</i>
</row>
<row>
<div class="howItWorks">
<h5>Boosted Earnings</h5>
<p>A smart algorithm monitors your spending patterns. Any spare cash is transferred into your Stack investment portfolio, giving you higher returns.</p>
</div>
</row>
</div>
<div class="col l6 m12 center-align">
<row>
<i class="large material-icons howItWorks-icon">cached</i>
</row>
<row>
<div class="howItWorks">
<h5>Frictionless Withdrawals</h5>
<p>We know that sometimes life gives you lemons, so Stack lets you access your cash in real time with our instant bank withdrawal feature.</p>
</div>
</row>
</div>
<div class="col l6 m12 center-align">
<row>
<i class="large material-icons howItWorks-icon">account_balance</i>
</row>
<row>
<div class="howItWorks">
<h5>Strong Foundations</h5>
<p>You can trust Stack's tech - its origins are in advanced computer science, nobel prize winning economics and is fully licensed and governed by ASIC*.</p>
<small>* Australian Securities Investment Commission</small>
</div>
</row>
</div>
</div>
</div>
</section>
<!-- End How It Works section -->
<!-- Stack section -->
<section>
<div class="stack-heading-background">
<div class="container center-align">
<div class="section-heading">
<h2>Stack earns you more</h2>
</div>
</div>
</div>
</section>
<section id="stack">
<div class="stack-background">
<div class="container">
<form class="col s12">
<!-- {% csrf_token %} -->
<row class="center-align">
<div class="col s12 stack-heading5">
<h5>How much do you save per month?</h5>
</div>
<div style="padding-top: 50px;">
<div id="savings-slider"></div>
</div>
<div class="center-align">
<h5 id="input-format"></h5>
</div>
</row>
<row>
<div class="center-align">
<p><i class="small material-icons howItWorks-icon">info</i>
<span class="answer">The average millenial saves $500 per month. Millenials are actually the best savers in Australia! Must be all those Netflix and chill nights...</span></p>
</div>
</row>
<row class="center-align">
<div class="col s12 stack-heading5" style="padding-top:10px">
<h5>What are you saving for?</h5>
</div>
</row>
<row>
<div class="col m6">
<div class="stack-radio-btn center-align">
<label>
<input type="radio" id="savingTargetHoliday" name="inputSavingTarget" value="5000"/>
<img class="circle responsive-img hoverable" src="img/icon/holiday.png">
<div class="stack-label">Holiday</div>
</label>
</div>
<div class="stack-radio-btn center-align">
<label>
<input type="radio" id="savingTargetCar" name="inputSavingTarget" value="25000"/>
<img class="circle responsive-img hoverable" src="img/icon/car.png">
<div class="stack-label">Car</div>
</label>
</div>
<div class="stack-radio-btn center-align">
<label>
<input type="radio" id="savingTargetHouse" name="inputSavingTarget" value="75000"/>
<img class="circle responsive-img hoverable" src="img/icon/house.png">
<div class="stack-label">House</div>
</label>
</div>
<div class="stack-radio-btn center-align">
<label>
<input type="radio" id="savingTargetWedding" name="inputSavingTarget" value="20000"/>
<img class="circle responsive-img hoverable" src="img/icon/wedding.png">
<div class="stack-label">Wedding</div>
</label>
</div>
<div class="stack-radio-btn center-align">
<label>
<input type="radio" id="savingTargetRetirement" name="inputSavingTarget" value="1000000"/>
<img class="circle responsive-img hoverable" src="img/icon/retirement.png">
<div class="stack-label">Retirement</div>
</label>
</div>
</div>
<div class="stack-radio-btn center-align">
<label>
<input type="radio" id="savingTargetAvocado" name="inputSavingTarget" value="2500"/>
<img class="circle responsive-img hoverable" src="img/icon/avocado.png">
<div class="stack-label">Smashed Avo</div>
</label>
</div>
</row>
<row>
<div class="holidayAnswer center-align">
<p><i class="small material-icons howItWorks-icon">info</i>
<span class="answer">Cocktails on the beach anyone?! $5,000 should do it in style</span></p>
</div>
<div class="carAnswer center-align">
<p><i class="small material-icons howItWorks-icon">info</i>
<span class="answer">Vroom vroom! Impress your peeps with a brand new $20,000 car</span></p>
</div>
<div class="houseAnswer center-align">
<p><i class="small material-icons howItWorks-icon">info</i>
<span class="answer">Not everyone is locked out of the housing market! $75,000 should get you a deposit on a sweet pad</span></p>
</div>
<div class="weddingAnswer center-align">
<p><i class="small material-icons howItWorks-icon">info</i>
<span class="answer">Splurge $20,000 on your big day and don’t feel guilty about skimping out on your distant relatives!</span></p>
</div>
<div class="retirementAnswer center-align">
<p><i class="small material-icons howItWorks-icon">info</i>
<span class="answer">You'll need at least $1,000,000 to enjoy the perks of retirement...like making a grand entrance at the pokies in the latest model mobility scooter!</span></p>
</div>
<div class="avocadoAnswer center-align">
<p><i class="small material-icons howItWorks-icon">info</i>
<span class="answer">Two raw vegan brunches every weekend will set you back $2,500 each year! Better start saving...</span></p>
</div>
</row>
<div class="row" style="padding-bottom:15%">
<div class="input-field col s12 center-align">
<button class="btn waves-effect waves-light stack-btn" type="submit" name="action">Submit
<i class="material-icons right">send</i>
</button>
</div>
</div>
</form>
</div>
</div>
</section>
<!-- End Stack section -->
Now it my css code
/*------------------------------------*\
#HERO Section
\*------------------------------------*/
.hero-background {
background-image: url("../img/hero-bg.png");
background-color: #EAEAEA;
background-repeat: no-repeat;
height: auto;
background-size: cover;
background-position: right top;
}
#media only screen and (max-width: 993px) {
.hero-background {
background-position: 75% 50%;
}
}
.hero-title1 {
color: #4741d6;
padding-top: 30px;
padding-bottom: 10px;
line-height: 1.2;
}
.hero-title5 {
color: #4741d6;
padding-bottom: 30px;
line-height: 1.5;
}
/*------------------------------------*\
#HOW IT WORKS Section
\*------------------------------------*/
.howItWorks {
padding: 0px 60px 20px 60px;
}
.howItWorks-icon {
color: #4741d6;
}
I just checked the link that you provided and i tried to achieve the same
fiddle : https://jsfiddle.net/s92o1xq9/1/
you have to use media query for different breakpoints to change the ratio of the img
.hero-background {
background-color: #ccc;
height: 75vh;
position: relative;
z-index: 6;
}
.overlay {
position: absolute;
right: 0;
top: 0;
z-index: -1;
}
.overlay img {
max-width: 100%;
height: auto;
}
.data {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
<div class="hero-background">
<div class="overlay">
<img src="http://djgt.co.uk/random/stack/img/hero-bg.png" alt="">
</div>
<div class="data">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione atque, error maiores minima modi ipsam possimus rerum ad molestias est architecto, quae aperiam sunt eaque veritatis aliquid fugiat maxime. Impedit?
</div>
</div>
Here what you need as per screenshot is to slice the laptop image with the pattern in png format and place it in a div and make it absolute relative to main banner section.
Hope this is helpful to you. kindly check the example snippet.
.banner {
height: 500px;
position: relative;
display: flex;
align-items: center;
background: #eee;
z-index: 1;
}
.content {
padding: 30px 0;
}
.ab {
position: absolute;
right: 0;
top: 0;
}
<div class="banner">
<h1>Hello Dummy is here</h1>
<div class="ab">
<img src="https://image.ibb.co/eY8X5d/Untitled_1.png">
</div>
</div>
<div class="content">
<h1>Hello Dummy is here</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>

CSS/Bootstrap: Align Font-Awesome icons in right-bottom corner of sidebar

I have a problem with aligning icons inside the sidebar. I want to have a few social icons in right-bottom corner of a sidebar.I tried using margins but it looks horrible and ugly.
Here's an example in JSBin (please resize the window to at least 1000px).
html, body, .container-fluid, .row {
height: 100%;
}
body {
background-color: #F2F0F1;
}
.sidebar {
background-color: tomato;
}
#media (min-width: 992px) {
.sidebar {
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 1000;
display: block;
background-color: tomato;
box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}
}
ul li {
margin: 0 auto;
line-height: 50px;
list-style: none;
text-align: right;
margin-right: 20px;
}
ul li a {
color: rgba(255, 255, 255, 0.5);
text-decoration: none;
}
a:hover {
text-decoration: none;
background-color: rgba(0, 0, 0, 0.4);
padding: 4px;
color: tomato;
}
.hi {
margin-right: 20px;
text-align: right;
color: rgba(0, 0, 0, 0.4);
}
.content {
padding: 2% 4% 2% 4%;
color: rgba(0, 0, 0, 0.4);
background-color: #F2F0F1;
}
#fixedbutton {
position: fixed;
top: 0px;
right: 0px;
}
.sidebar-bottom-wrap {
position: absolute;
bottom: 60px;
right: 40px;
max-width: 200px;
}
.icons-sidebar-unit {
display: inline-block;
width: 30px;
height: 30px;
line-height: 30px;
vertical-align: baseline;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PRZEMO PORTFOLIO</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- SIDEBAR -->
<div class="container">
<div class="row">
<div class="col-md-3 sidebar"><div class="foto">
<img src="pic.png" class=" img-responsive img-circle " alt="pic">
</div>
<h3 class="hi">Hi! I am <strong>Mike</strong> ,a front-end developer.</h2>
<!-- MENU -->
<ul>
<li>ABOUT</li>
<li>PROJECTS</li>
<li>CONTACT</li>
</ul>
<!-- footer ICONS -->
<footer>
<!--Social icons-->
<div class="social-icons-sidebar">
<a title="Follow us" href="https://twitter.com/uiueux" class="icons-sidebar-unit">
<i class="fa fa-twitter-square"></i>
</a>
<a title="Follow us" href="https://www.facebook.com/Uiueux/" class="icons-sidebar-unit">
<i class="fa fa-facebook-square"></i>
</a>
<a title="" href="#" class="icons-sidebar-unit">
<i class="fa fa-google-plus-square"></i>
</a>
<a title="" href="https://www.youtube.com/playlist?list=PLJkj39CuqdNz7WTWdHTbSrOvQL03sIZa-" class="icons-sidebar-unit">
<i class="fa fa-youtube-square"></i>
</a>
</div>
<div class="copyright">
Copyright © 2017. Designed by
<a href=http://www.uiueux.com>wwwS</a>.
</div><!--End copyright-->
<!--
<i class="fa fa-linkedin A " aria-hidden="true"></i>
<i class="fa fa-github" aria-hidden="true"></i>
<i class="fa fa-envelope-o" aria-hidden="true"></i>
-->
</div>
</footer>
<!-- MAIN -->
<div class="col-md-9 col-md-offset-3 content">
<h2 id="about">ABOUT ME</h2>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea.
<div class="container-fluid">
<h2 id="projects">RECENT PROJECTS</h2>
<div class="row">
<div class="col-md-9">
<div class="col-xs 12 col-sm-6 col-sm-6 col-md-6 ">
<img src="1.png" alt="" class="img-responsive img-thumbnail">
</div>
<div class="col-xs 12 col-sm-6 col-sm-6 col-md-6 ">
<img src="2.png" alt="" class="img-responsive img-thumbnail">
</div>
<div class="col-xs 12 col-sm-6 col-sm-6 col-md-6 ">
<img src="3.png" alt="" class="img-responsive img-thumbnail">
</div>
<div class="col-xs 12 col-sm-6 col-sm-6 col-md-6 ">
<img src="4.png" alt="" class="img-responsive img-thumbnail">
</div>
</div>
</div>
</div>
<br>
SKILLZ:<br>
HTML 5 - PRO <br>
CSS 3 - PRO <br>
JS - NOOB <br>
JQUERY - NOOB<br>
SASS - MAD <br>
GRUNT - GOD
<hr>
<h2 id="contact">CONTACT</h2>
<form class="form-horizontal">
<fieldset>
<!-- Form Name -->
<!-- Text input-->
<div class="form-group">
<label class="col-md-12 control-label" for=""></label>
<div class="col-md-12">
<input id="" name="" type="text" placeholder="name" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-12 control-label" for=""></label>
<div class="col-md-12">
<input id="" name="" type="text" placeholder="email" class="form-control input-md">
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-12 control-label" for=""></label>
<div class="col-md-12">
<textarea class="form-control" id="" name="">message</textarea>
</div>
</div>
<!-- Button -->
<div class="form-group">
<label class="col-md-12 control-label" for="singlebutton"></label>
<div class="col-md-12">
<button id="singlebutton" name="singlebutton" class="btn btn-default">send message</button>
</div>
</div>
</fieldset>
</form>
<img src="qrcode1.png" class="img-responsive center-block" alt="">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod temp eu fuglorem Lorem ipsuat nulla pariatur. Exceeu fugiat it in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui r sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
</div>
</div>
</div>
</body>
</html>
The easiest way is probably to absolutely position them .social-icons-sidebar { position: absolute; bottom: 0; right: 0; } https://jsbin.com/petixugodu/1/edit?html,css,output
You could also use flexbox. Make the sidebar a column flex container, set the footer to flex-grow: 1 so that it extends to the bottom of the sidebar, put the social icons at the bottom by using margin-top: auto and order: 1 then align them to the right with text-align: right or align-self: flex-end https://jsbin.com/tukiqonase/edit?html,css,output
To align your icons to the right, try:
.icons-sidebar-unit {
float: right;
}
Also, while looking at your code, I noticed you had a height / width set to 30px on your icon units. If this was to increase the size of the icons themselves, try:
.icons-sidebar-unit {
font-size: 30px;
}
A lot of people get confused on this one because it seems like icons should be styled like images, but they are actually styled as fonts.

Bootstrap 3 Panels with images

I'm trying to re-create this panel:
I just wondered if anyone knows how I can go about this , I have my html markup done. But I have no idea how I would begin to style it..
My example html:
<div id="mainContainer" class="container">
<div class="row">
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
<div class="panel panel-default">
<div class="panel-heading">Item 01</div>
<div class="panel-body"><img src="http://placehold.it/150x150" alt="" class="img-responsive center-block" />
</div>
</div>
</div>
</div>
Check this out this will help you....
.my_panel > .panel-body {
padding: 0px;
}
.my_panel > .panel-body > img {
width: 100%;
height: 100%;
}
.my_panel > .panel-footer {
text-align: center;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div id="mainContainer" class="container">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
<div class="panel panel-default my_panel">
<div class="panel-body">
<img src="http://placehold.it/150x150" alt="" class="img-responsive center-block" />
</div>
<div class="panel-footer">
<h3>The company</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum, voluptas, sunt vitae mollitia iure perferendis rerum odio! Natus, cupiditate, est, quas, non perspiciatis in quo possimus eos voluptas tempore maxime.</p>
Read More
</div>
</div>
</div>
</div>
</div>
</div>
</div>

Resources