Columns side by side with css grid - html

I am having a problem understanding how CSS grid works.
I want 3 columns side by side with a specific width and height, but there's a gap between each columns.
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
grid-column-gap: 0px;
}
.left {
grid-column: 1;
border: 1px solid red;
height: 500px;
width: 300px;
}
.middle {
grid-column: 2;
border: 1px solid red;
height: 500px;
width: 300px;
}
.right {
grid-column: 3;
border: 1px solid red;
height: 500px;
width: 300px;
}
<div class="grid-container">
<div class="left">1</div>
<div class="middle">2</div>
<div class="right">3</div>
</div>
In which way I can put away this gap? And if anyone can explain me how to reduce the line of code in css I would be grateful, thanks!
EDIT
I solved in this way
.wrapper{
display: grid;
place-items: center;
min-height: 100vh;
}
.grid-container{
margin: 0 auto;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
grid-column-gap: 0px;
width: 60vw;
height: 450px;
}
.left{
background-color: hsl(31, 77%, 52%);
grid-column: 1;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.middle{
background-color: hsl(184, 100%, 22%);
grid-column: 2;
}
.right{
background-color: hsl(179, 100%, 13%);
grid-column: 3;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
<div class="wrapper">
<div class="grid-container">
<div class="left">
<img src="images/icon-sedans.svg" alt="sedans" class="logo">
<h2 class="text-title">Sedans</h2>
<div class="main-text">
Choose a sedan for its affordability and excellent fuel economy. Ideal for cruising in the city
or on your next road trip.
</div>
<button class="btn">Learn More</button>
</div>
<div class="middle">
<img src="images/icon-suvs.svg" alt="sedans" class="logo">
<h2 class="text-title">Suvs</h2>
<div class="main-text">
Take an SUV for its spacious interior, power, and versatility. Perfect for your next family vacation
and off-road adventures.
</div>
<button class="btn">Learn More</button>
</div>
<div class="right">
<img src="images/icon-luxury.svg" alt="sedans" class="logo">
<h2 class="text-title">Luxury</h2>
<div class="main-text">
Cruise in the best car brands without the bloated prices. Enjoy the enhanced comfort of a luxury
rental and arrive in style.
</div>
<button class="btn">Learn More</button>
</div>
</div>
</div>
But now what I want to do is to make all of this to be responsive

Specify your width on your grid parent, remove any static width on your child elements. With the fraction set in grid-template-columns: 1fr 1fr 1fr; each column will take up a third of the parents width. So if your parent is set to say 80 view width => 80% of the view port, then your columns will spread out over a third of that width each.
If you have had 4 items each set to 1fr, then they would take up 25%, 5 would take up 20%, basically => number of children elements/parents width.
.grid-container {
margin: auto;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
grid-column-gap: 0;
width: 80vw;
}
.left>ul {
height: 80%;
background: pink;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: space-between;
}
.left {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 1px solid red;
grid-column: 1;
}
.middle {
padding: 5px;
grid-column: 2;
border: red solid 1px;
}
.middle span {
display: flex;
flex-direction: column;
justify-content: start;
padding: 5px;
grid-column: 2;
background: lightblue;
border-bottom: 1px solid black;
}
.right {
grid-column: 3;
border: 1px solid red;
padding: .2rem;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.row {
padding: 0 1rem;
display: flex;
justify-content: space-between;
align-items: start;
background: #EEE;
}
.right div:nth-of-type(2) {
color: #a2a2a2;
text-align: center;
}
<div class="grid-container">
<div class="left">Here is some content for column 1 with list items
<ul>
<li>
display: flex
</li>
<li>
flex-direction: column
</li>
<li>
justify-content: space-around
</li>
<li>
align-items: flex-start
</li>
</ul>
</div>
<div class="middle">
<span>This is inside a span tag</span>
<span>Parent has flex direction of column</span>
<span>Justify Content set at start</span>
<span>this is inside a span tag</span> More content for column 2. it is a bit longer than the first textual content. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum viverra pulvinar tincidunt. Nam consequat metus et cursus auctor.
Suspendisse posuere sem ut tortor lacinia, nec tempor turpis ultrices. Sed vitae gravida orci.</div>
<div class="right">
<div class="row">
<h3>Row</h3>
<h3>Space</h3>
<h3>Between</h3>
</div>
<span>Parents flex <span style="background: pink;">flex-direction </span> and <span style="background: pink;">display-flex</span> <b>flex</b> and <b>column</b></span></span>
<span>Parents flex <span style="background: pink;">justify-content</span> is set to <b>space-around</b></span>
<div>Good ole text-align: center... Vestibulum viverra pulvinar tincidunt. Nam consequat metus et cursus auctor. Suspendisse posuere sem ut tortor lacinia, nec tempor turpis ultrices.
</div>
</div>
</div>
Example of vertically centering text with flex-direction set to column.
body {
margin: 0;
padding: 0;
}
.parent {
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
height: 100vh;
}
.child {
margin: 0 auto;
height: 200px;
width: calc(200px - 1rem);
background: lightblue;
display: flex;
flex-direction: column;
justify-content: center;
padding: .5rem;
}
<div class="parent">
<div class="child">Vertically centering using flex.
<br><br> Justify content when parents flex-direction is set to column, will center content vertically.</div>
</div>

You can simply specify the widths that you need in the grid-template-columns property. There is no gap visible between columns.
If you want the red borders you can specify a common class for those divs and just do it once.
.grid-container{
display: grid;
grid-template-columns: 300px 300px 300px;
grid-template-rows: 1fr;
column-gap: 0;
height: 500px;
}
.left{
border: 1px solid red;
}
.middle{
border: 1px solid red;
}
.right{
border: 1px solid red;
}
<div class="grid-container">
<div class="left">1</div>
<div class="middle">2</div>
<div class="right">3</div>
</div>

Related

How do I create 3 columns flex grid with first and last columns have 2 rows while the middle has rowspan?

As the title says, here's my example
I've already tried doing this using flex with position absolute but the problem is the responsiveness. How do I make this better? Is there a way that I could do this with just flexbox and not use position absolute while making the first row of the first and last column have equal height?
Here's my initial code:
<div class="block uk-width-1-1">
<div class="content-wrapper">
<div class="content uk-position-relative">
<div>
<div class="uk-grid uk-child-width-1-4 uk-flex-between">
<div class="card--wrapper">
<div class="card">
<h3>Lorem Ipsum</h3>
<p class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis tortor ut ante rhoncus placerat. Nam at placerat tellus, a accumsan nisi.</p>
</div>
</div>
<div class="card--wrapper">
<div class="card">
<h3>Lorem Ipsum</h3>
<p class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis tortor ut ante rhoncus placerat. Nam at placerat tellus, a accumsan nisi.</p>
</div>
</div>
</div>
<div class="uk-grid uk-child-width-1-4 uk-flex-between">
<div class="card--wrapper">
<div class="card">
<h3>Lorem Ipsum</h3>
<p class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis tortor ut ante rhoncus placerat. Nam at placerat tellus, a accumsan nisi.</p>
</div>
</div>
<div class="card--wrapper">
<div class="card">
<h3>Lorem Ipsum</h3>
<p class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam quis tortor ut ante rhoncus placerat. Nam at placerat tellus, a accumsan nisi.</p>
</div>
</div>
</div>
</div>
<div class="image--wrapper uk-position-absolute uk-width-1-3">
<div class="image">
<!-- Image here (middle column)-->
<img src="/../images/hero-sample.png" alt="image">
</div>
</div>
</div>
</div>
</div>
CSS
.image--wrapper {
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 0;
}
.block {
background: green;
}
h3, p.description {
color: white;
font-family: 'Poppins';
}
p.description {
font-weight: 400;
font-size: 14px;
line-height: 21px;
color: rgba(255,255,255,0.7);
margin-bottom: 0;
}
h3 {
font-weight: 600;
font-size: 16px;
line-height: 28px;
}
.card {
max-width: 240px;
padding: 20px;
box-sizing: border-box;
border: 1px solid rgba(255,255,255, 0.3);
}
.child-width-1-4 > div {
width: 25%;
}
.width-1-3 {
width: 33%;
}
.grid {
display: flex;
flex-wrap: wrap;
margin: 18.12px 0 0 0;
padding: 0;
}
.flex-between {
justify-content: space-between;
}
.position-absolute {
position: absolute !important;
}
.position-relative {
position: relative !important;
}
#media screen and (max-width: 1200px) {
.content-wrapper {
padding: 60px 25px
}
}
In this solution, the outer container is a grid with 12 columns. The middle column (.col2) takes up twice the space of col1 and col3. The -1 in grid-column: 10 / -1 means to span to the end of the grid, wherever it is.
Inside, I make the first and last columns into flexboxes, so that their children can take up an even amount of space in their respective containers. All spacing between columns and rows is accomplished using gap.
.container {
display: grid;
grid-template-columns: repeat(12, 1fr);
min-height: 100vh;
min-height: 100dvh;
gap: 1rem;
padding: 1rem;
}
/* 3 columns */
.col1 {
grid-column: 1 / 4;
}
/* 6 columns */
.col2 {
grid-column: 4 / 10;
}
/* 3 columns */
.col3 {
grid-column: 10 / -1;
}
.col1,
.col3 {
display: flex;
flex-direction: column;
gap: 1rem;
}
.col1 > *,
.col3 > * {
flex: 1;
}
body { margin: 0; }
* { box-sizing: border-box; }
.col2, .container > * > * { border: 1px solid; }
<div class="container">
<div class="col1">
<div></div>
<div></div>
</div>
<div class="col2"></div>
<div class="col3">
<div></div>
<div></div>
</div>
</div>
jsFiddle
there is more than one way to do that. I personally prefer using flex for such situations because it's more flexible for adjustment.
so basically, I used three containers in a row flex-direction then in the containers on the sides, I put 2 divs in each with column flex-direction. that's it.
you can control max and min width as you wish.
body {
background: lightgrey;
display: flex;
justify-content: center;
}
#container {
/* background: lightcoral; */
width: 100%;
height: 400px;
display: flex;
flex-direction: row;
}
.middle {
width: 60%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.left, .right{
width: 20%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.left div,
.right div {
border: 1px solid;
width: 100%;
height: 50%;
margin: 10px;
}
.middle div {
border: 1px solid;
width: 95%;
height: 100%;
margin: 10px;
}
<body>
<div class="container" id="container">
<div class="left">
<div></div>
<div></div>
</div>
<div class="middle">
<div></div>
</div>
<div class="right">
<div></div>
<div></div>
</div>
</div>
</body>
In your problem its better to display grid instead of flex
div1: middle
div2: left-top
div3: left-bottom
div4: right-top
div5: right-bottom
.parent {
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 0px;
grid-row-gap: 0px;
}
.div1 { grid-area: 1 / 2 / 3 / 5; }
.div2 { grid-area: 1 / 1 / 2 / 2; }
.div3 { grid-area: 2 / 1 / 3 / 2; }
.div4 { grid-area: 1 / 5 / 2 / 6; }
.div5 { grid-area: 2 / 5 / 3 / 6; }

testing css layout in firefox vs safari on ios

I would really appreciate it if someone can enlighten me with my css layout issue. On my localhost, I am using Firefox's responsive design mode tool to check my layout in iPhoneX and everything seems to be going according to plan. However, when I deploy it to Heroku, and open the page, everything goes haywire. Here is what it looks like:
*EDIT: The one on the left is from Firefox's Responsive Design Mode, the one on the right is the from iOs' Safari.
First of all, forgive my naivete but I was thinking that the simulation in Firefox should match the actual output in iOs Safari otherwise it would be difficult to test layouts. :) So the code snippet can verify this when you run the snippet on mobile it replicates my exact issue.
Secondly, I can't for the life of me, see what actually I am doing wrong with my CSS. (facepalm). Again, any help is appreciated.
#splash-bg {
height: 150px;
width: 100vw;
background: url("https://images.unsplash.com/photo-1425326452142-67c31f601d2f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2982&q=80") no-repeat center 50px fixed;
background-size: contain;
border: 1px solid black;
}
#brand-info {
width: 100%;
display: flex;
flex-direction: column-reverse;
}
#brand-info #desc {
padding: 20px;
background-color: #ffd400;
}
#brand-info #desc img {
width: 100%;
max-height: 50px;
margin: 20px 0 10px 0;
border: 1px solid black;
}
#brand-info #desc p {
text-align: justify;
font-size: 0.8em;
line-height: 1.2em;
color: #000;
}
#brand-info #desc .social {
display: flex;
flex-direction: columns;
justify-content: space-evenly;
margin-top: 50px;
}
#brand-info .store-slides {
grid-column: 1 / 11;
grid-row: 1 / 4;
display: grid;
grid-template-columns: repeat(10, 1fr);
grid-template-rows: repeat(10, 1fr);
background-color: #ffd400;
// width: 100vw;
}
#brand-info .store-slides .brand-stores {
grid-column: 1 / 11;
grid-row: 1 / 11;
width: 100%;
display: grid;
grid-template-columns: repeat(10, 1fr);
grid-template-rows: repeat(10, 1fr);
}
#brand-info .store-slides .brand-stores img {
width: 100%;
height: 100%;
object-fit: contain;
grid-column: 1 / 11;
grid-row: 1 / 11;
border: 1px solid black;
}
#brand-info .store-slides .brand-stores .label {
grid-column: 4 / 11;
grid-row: 6 / 7;
font-size: 0.8em;
background-color: rgba(255, 212, 0, 0.5);
display: flex;
align-items: center;
padding: 0 0 0 20px;
color: #000;
font-weight: bold;
}
#brand-info .store-slides #left {
grid-column: 1 / 2;
grid-row: 5 / 7;
transform: rotate(90deg);
align-self: center;
justify-self: center;
}
#brand-info .store-slides #right {
grid-column: 10 / 11;
grid-row: 5 / 7;
transform: rotate(-90deg);
align-self: center;
justify-self: center;
}
<div id="fp-container">
<div id="splash-bg">
</div>
<div id="brand-info">
<div id="desc">
Brand Logo
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed malesuada ex eget enim lobortis dictum pharetra vel odio. Integer vulputate, ligula at placerat accumsan, nibh lectus consectetur metus, in consectetur nulla nunc at ante. Morbi felis leo, pellentesque
sit amet enim sit amet, blandit malesuada lacus.
</p>
<div class="social">
instagram
<router-link to="/locator">facebook</router-link>
</div>
</div>
<div class="store-slides">
<div class="brand-stores">
<img src="https://images.unsplash.com/photo-1425326452142-67c31f601d2f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2982&q=80" alt="" />
<div class="label">Store Name 1</div>
</div>
<div id="left" class="arrows">left arrow</div>
<div id="right" class="arrows">right arrow</div>
</div>
</div>
</div>

how to make row across multiple css3 columns same height?

I am trying to learn CSS grid, I have nested CSS grid and in which the parent CSS grid container has multiple columns each of them have 4 rows and I want the rows to be equal to each other for example height of the first row in the first column equal to the that in a second column.
#product-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 1em;
justify-items: center;
padding: 1em;
}
#product-grid img {
width: 100%;
height: 291px;
}
.product-item {
display: grid;
/* grid-auto-rows:1fr; */
grid-template-rows: 70px, 100px, 200px, 100px;
border-style: solid;
border-color: #2c4251;
border-width: 1px;
border-radius: 5px;
padding: 1em;
}
.cntnt {
text-align: justify;
overflow: hidden;
}
.product-item {}
.more {
text-align: left;
align-self: end;
}
.ttl {
margin-top: 20px;
text-align: center;
align-self: flex-start;
}
<div id="product-grid">
<div class='product-item'>
<img src=imgs/1.png>
<div class='ttl'>this is test title</div>
<div class='cntnt'>this is test caption</div>
<div class='more'>
<div><a href=/view.php?pid=1>more </a></div>
</div>
</div>
<div class='product-item'><img src=imgs/2.jpg>
<div class='ttl'>title</div>
<div class='cntnt'>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dolores, inventore? Officia perferendis</div>
<div class='more'>
<div><a href=/view.php?pid=2>more </a></div>
</div>
</div>
</div>

Flexbox Layout - equal heights and fittext

I am trying to build a basic user interface using flexbox, I have this so far..
body,html {
margin:0;
padding:0;
height:100%;
}
.container {
height:100%;
display:flex;
flex-direction:column;
}
.top {
flex:4;
display:flex;
background:wheat;
align-items: center;
justify-content: center;
}
.bottom {
flex:1;
background:teal;
}
.bottom_content {
display:flex;
flex-direction:column;
}
.section1 {
flex:1;
font-size:20px;
text-align:center;
}
.section2 {
flex:1;
}
.btn {
background:red;
color:white;
padding:20px;
}
<div class="container">
<div class="top">
<span>TOP CONTENT</span>
</div>
<div class="bottom">
<div class="bottom_content">
<div class="section1">
<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacus quam, blandit non lacus in, venenatis tempor dolor. Aliquam in lectus lacus. </span>
</div>
<div class="section2">
<div class="btn">
THIS IS A BUTTON
</div>
</div>
</div>
</div>
</div>
I am trying to achieve this...
How can I make the bottom section with equal height and make the content within it vertically and horizontally centered?
I am also planning on using fittext.js or similar to make the button and the text above fit into the flex item.
Where am I going wrong?
The problem
The issue with your current code is that .bottom is not filling the available space and that the default alignment and justification is being used.
The fix
The desired output can be achieved by doing the following:
Remove flex:1; from .section1 and .section2. This stops these divs from expanding to fill the available space
Add align-items: center; and justify-content: space-evenly; to.bottom_content. This will center align and evenly space out the .section1 and .section2 divs
Add display: flex; to .bottom. This will make .bottom expand to fit the available space
Change flex: 1; to flex: 1 0 auto; on .bottom. This will stop .bottom from reducing in size when the height of the window is small
body,
html {
margin: 0;
padding: 0;
height: 100%;
}
.container {
height: 100%;
display: flex;
flex-direction: column;
}
.top {
flex: 4;
display: flex;
background: wheat;
align-items: center;
justify-content: center;
}
.bottom {
/*Change*/
flex: 1 0 auto;
background: teal;
/*Add*/
display: flex;
}
.bottom_content {
display: flex;
flex-direction: column;
/*Add*/
align-items: center;
justify-content: space-evenly;
}
.section1 {
/*Remove*/
/*flex:1;*/
font-size: 20px;
text-align: center;
}
.section2 {
/*Remove*/
/*flex:1;*/
}
.btn {
background: red;
color: white;
padding: 20px;
}
<div class="container">
<div class="top">
<span>TOP CONTENT</span>
</div>
<div class="bottom">
<div class="bottom_content">
<div class="section1">
<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacus quam, blandit non lacus in, venenatis tempor dolor. Aliquam in lectus lacus. </span>
</div>
<div class="section2">
<div class="btn">
THIS IS A BUTTON
</div>
</div>
</div>
</div>
</div>
I have commented some of your code. Please Check
body,
html {
margin: 0;
padding: 0;
height: 100%;
}
.container {
height: 100%;
display: flex;
flex-direction: column;
}
.top {
flex: 4;
display: flex;
background: wheat;
align-items: center;
justify-content: center;
}
.bottom {
flex: 1;
background: teal;
}
.bottom_content {
display: flex;
flex-direction: column;
}
.section1 {
<!-- flex: 1;
-->font-size: 20px;
text-align: center;
}
.section2 {
flex: 1;
}
.btn {
background: red;
color: white;
padding: 20px;
margin-top: 25px;
}
<div class="container">
<div class="top">
<span>TOP CONTENT</span>
</div>
<div class="bottom">
<div class="bottom_content">
<div class="section1">
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacus quam, blandit non lacus in, venenatis tempor dolor. Aliquam in lectus lacus. </div>
<button class="btn">
THIS IS A BUTTON
</button>
</div>
<!-- <div class="section2"> -->
<!-- <div class="btn"> -->
<!-- THIS IS A BUTTON -->
<!-- </div> -->
<!-- </div> -->
</div>
</div>
</div>
justify-content:center and display:flex is the key.
you can adjust margin as you wish,besides it should do the trick.
.bottom_content {
display: flex;
flex-direction: column;
margin-top: 20px;
}
.section2 {
flex: 1;
display: flex;
justify-content: center;
}
.btn {
background: red;
color: white;
padding: 20px;
width: fit-content;
position: absolute;
margin-top: 10px;
}

Flex item shrinks and hides its content

I am trying to create a flexbox that distributes space equally amongst its 2 children. The issue I encountered is that after I minimize the screen, the content of the first child is becoming hidden.
See: https://jsfiddle.net/jo6dj8ne/
Gif showing the problem
I'd like the content of the info-section div to always be visible, but the map-section div to shrink and the scrollbar to appear.
<div class="contact-container">
<div class="info-section">
... some content (info-section is also a flexbox)
</div>
<div class="map-section"></div>
</div>
The issue was setting flex to 1, which was equivalent to setting it to 1 1 0. At the time I was not familiar with flex-grow, flex-shrink and flex-basis CSS properties, that's why I was having trouble making it work.
After setting flex of info-section to 1 0 auto it no longer shrinks and its initial size is equal to the size of its content.
Working example here.
Just give overflow: auto; to .info-section
try this code:
html, body {
height: 100%;
}
.contact-container {
display: flex;
flex-direction: column;
height: 100%;
overflow: auto;
}
.contact-container .info-section {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
overflow: auto;
}
.contact-container .info-section .social {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 1em;
margin-top: var(--padding-large);
}
.contact-container .map-section {
background-color: blue;
height: 200px;
flex: 1;
}
<div class="contact-container">
<div class="info-section">
<div class="heading">Heading</div>
<div class="content">
<p>Lorizzle ipsum dolizzle stuff amizzle, shizznit adipiscing elit. Nullizzle sapien velizzle, mofo volutpizzle, suscipit quis, gravida bizzle.</p>
</div>
<div class="social">
<img src="https://image.flaticon.com/teams/slug/smashicons.jpg" width="40px">
<img src="http://icons.iconarchive.com/icons/graphicloads/100-flat/256/home-icon.png" width="40px">
<img src="http://freedesignfile.com/upload/2017/04/Summer-holiday-vector-icon.jpg" width="40px">
<img src="http://icons.iconarchive.com/icons/paomedia/small-n-flat/1024/sign-check-icon.png" width="40px">
</div>
</div>
<div class="map-section">
</div>
</div>
Simply add min-height: 300px; to .info-section. This will force the container to always have at least 300px of height. If it's bigger than that, it will scroll.
Complete CSS code:
html, body {
height: 100%;
}
.contact-container {
display: flex;
flex-direction: column;
height: 100%;
overflow: auto;
.info-section {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
min-height: 300px;
.social {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 1em;
margin-top: var(--padding-large);
}
}
.map-section {
background-color: blue;
min-height: 200px;
flex: 1;
}
}