Hi Im relatively new to html and need some help
Im coding my profile on a site where CSS is a premium option so I can only use html
I keep running in to the same problem where I can't display two card classes (both of which I use for an info box on my profile) side by side
I'm always able to get the first one exactly where I want it but the second one gets stuck underneath and I want them aligned horizontally
Any pointers?
It always ends up looking something like this
<div class="container m-3 p-3" style="background-color: black; max-width: 950px; border-radius: 5px;">
<div class="container m-3 p-3" style="background: url('BG_IMG'); background-size: cover; #292929; max-width: 885px; border-radius: 5px;"
<div class="p-2 col-sm-4">
<center><img src="IMG_LINK"max-width: 200px; border-radius: 5px"></center>
<div class="card p-2 my-3 text-center">
<h1 class="m-0"><b>NAME</b></h1>
<p><b>SUBTITLE</b></p>
</div>
<div class="col-sm-8">
<div class="card">
<h class="m-3" style="height: auto; text-indent: 20px;"></h4>
<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.
</div>
</div>
<div class="col">
<div class="p-2 col-sm-4">
<div class= "p-2 card">
<h3 class="m-1 text-center">INTERESTS</h3>
<hr class="w-75 my-1" style="background: light; height: 1px;">
<div class="mx-n1 text-center my-auto">
<p class="m-1">CONTENT</p>
<hr class="w-75 my-2" style="background: light; height: 1px;">
<p class="m-1">CONTENT</p>
<hr class="w-75 my-1" style="background: light; height: 1px;">
<p class="m-1">CONENT</p>
<hr class="w-75 my-1" style="background: light; height: 1px">
<p class="m-1">CONTENT</p>
<hr class="w-75 my-1" style="background: light; height: 1px;">
<p class="m-1">CONTENT</p>
</div>
</div>
</div>
</div>
</div>
</div>
A couple of things:
A good thing to do in general is to proof read your code thoroughly, especially if something isn't working. It's annoying to do by hand, that's why I'd recommend using a text editor that does it for you. I personally use VS-code with Prettier for formatting, I'd start there if you don't have your own specific preferences. That's how I directly found a dozen syntax errors. Then if you want, you can just copy-paste it wherever after correcting the errors.
I assume you're using Bootstrap, since you're using their class names. HTML in itself has barely any styling possibilities, except for inline-css (like this: style="background-color: #FFFFFF;"). For layout, checkout their grid system.
Like someone already commented, a site that has css as a premium option probably isn't a site you want to be using. But if you have no other alternative, I made a version of this on codeply (using Bootstrap 5, not sure about which version your site uses, they are similar but not identical). I think this is something like what you're trying to achieve. I made some quite heavy changes on the markup, you'll have to fix the more exact layout yourself, I don't know exactly what you're trying to do, and I don't have the pictures.
Edit: here's the code I put on codeply:
<div class="container" style="background-color: black; max-width: 950px; border-radius: 5px;">
<div class="row m-3 p-3"
style="background: url('BG_IMG'); background-size: cover; background-color:#292929; max-width: 885px; border-radius: 5px;">
<div class="col-12">
<div class="card">
<img src="IMG_LINK" class="card-img-top" style: "max-width: 200px; border-radius: 5px">
<h1 class="card-title text-center">NAME</h1>
<p class="card-text fw-bold text-center">SUBTITLE</p>
</div>
</div>
</div>
<div class="row">
<div class="col-8">
<div class="card">
<h3 class="card-title m-3">Title?</h3>
<p class="card-text m-3">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.
</div>
</div>
<div class="col-4">
<div class="card">
<h3 class="card-title m-3">INTERESTS</h3>
<ul class="list-group">
<li class="list-group-item">CONTENT</li>
<li class="list-group-item">CONTENT</li>
<li class="list-group-item">CONENT</li>
<li class="list-group-item">CONTENT</li>
<li class="list-group-item">CONTENT</li>
</ul>
</div>
</div>
</div>
</div>
Related
I tried to change the color of the text on a specific zone. By specific, I mean the text area above the picture.
I use the TailwindCss library. But css is needed for this particular case. Here's what I did:
<div className='flex h-[600px] items-center'>
<div className='flex relative'>
<div className='flex flex-col relative'>
<div className='mb-[30px]'>
<h1 className='title text-9xl text-white truncate'>Explore Your own planet<br/>In <span className='stroke'>our New</span> metaverse</h1>
</div>
<div className='w-[26.2rem]'>
<p className='font-sans font-normal text-base text-white'>
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.
</p>
</div>
</div>
</div>
<div className='absolute inset-y-0 right-[-190px] top-[20px] z-[-50]'>
<div className='first__circle relative left-[-525px] rounded-full w-[526px] h-[526px]'>
<div className='second__circle relative right-[-40px] bottom-[-40px] bg-[#1E1E20] rounded-full w-[446px] h-[446px]'>
<div className='third__circle relative right-[-30px] bottom-[-30px] bg-[#1E1E20] border-2 border-[#323232] rounded-full w-[384px] h-[384px]'>
<div className='fourth__circle relative right-[-14px] bottom-[-14px] bg-[#1E1E20] border-2 border-[#323232] rounded-full w-[354px] h-[354px]'>
<div className='fifth__circle relative right-[-14px] bottom-[-14px] rounded-full w-[320px] h-[322px]'>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
</div>
</div>
You can use span tag and add styles to particular span using a class or id.
So I have been doing bootstrap for around a month, and so my HTML might be a bit messy. The background of the issue is that my task requires me to create a custom slick carousel to achieve a UI look like the one below:
With my current code this is what i am able to achieve:
Here is my html for what I have achieved so far:
.slider-left {
display: flex;
align-items: center;
p {
font-size: 16px;
border-bottom: 1px solid black;
padding-bottom: 10px;
}
}
.slider-middle {
display: flex;
align-items: center;
word-break: break-word;
h1 {
font-weight: bold;
color: blue;
}
h2 {
text-transform: uppercase;
font-style: italic;
font-size: 16px;
font-weight: normal;
}
}
.v-center {
width: 500px;
height: 1000px;
display: flex;
align-items: center;
}
.slider-image {
width: 100%;
}
.slider-right {
padding: 0;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="container-fluid">
<div class="row">
<!-- Left most text -->
<div class="col-lg-1 slider-left text-right">
<div class="container center-align">
<p>Publication</p>
</div>
</div>
<!-- Middle Text -->
<div class="col-md-4 slider-middle center-align">
<div class="container">
<h2>title2</h2>
<h1>title1</h1>
<p>hsdajflaflasdfldsfhlsadfhlsdjfsdljflsjdfsjlfalsjfhjlasfhlsflasfhalfhlasfdsjfdsjlfadsljfhslajfalsjfljsflajflaflajsfdjlafhghurthruhffnfjgjrgbhrturhtadsofadflnvfnilawieoil</p>
<a></a>
</div>
</div>
<!-- Carousel Image -->
<div class="col-md-7 slider-right">
<img class="slider-image" src="<?php bloginfo('template_directory'); ?>/assets/images/image1.jpg" alt="">
</div>
</div>
<div class="row">
<div class="col-5 slider-nav">
<p>navigation</p>
</div>
</div>
</div>
I am required to use bootstrap to achieve any kind of ui design because my supervisor says it helps for the responsiveness of the website. What happens here is that the whole container is moved for a similar container over and over. Please let me know what to do and any explanation would be a great help. Apart from that if anyone knows how to insert custom buttons and custom pagination in that navigation bar can let me know, I would really appreciate it, though I haven't looked much into it.
Cheers :)
Do you mean something like this?
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-sm-12">
<div class="row">
<div class="col-sm-4" style="background:#f2f2f2;">
Publication
</div>
<div class="col-sm-8">
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.
</div>
</div>
<div class="row">
<div class="col-sm-12" style="background:red;">navigation</div>
</div>
</div>
<div class="col-md-6 col-sm-12" style="background:#999;">
Image
</div>
</div>
</div>
I want to create a card that contains an image slideshow, with an accompanying description div on the side. I was trying to get the description div to fill up to the same height as the image beside it.
Currently, the description div simply takes up as much height as its contents require, but I want it to expand to fill the parent div.
I tried applying flex-grow and setting style="flex: 1 1 auto" to the flex-column div but it doesn't seem to be changing anything.
I found a few posts addressing having rows filling the height of a parent div but none for columns.
I'm currently using w-100 as well, to have the column fill the remaining width of the parent div, but for some reason h-100 doesn't seem to work the same way.
HTML with Bootstrap 4.1.1 min.css:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="card mb-4 box-shadow">
<div class="flex-row card-body d-flex flex-fill align-items-center">
<!-- Description Div -->
<div class="flex-column d-flex w-100 flex-fill align-items-end showborder">
<div class="p-2 ">
<!-- Project Title -->
<strong class="p-2 ">Title Text</strong>
<!-- GitHub Link -->
</div>
<div class="p-2 w-100 ">
<!-- Project Description -->
<p>
Description text 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>
<div class="mt-auto p-2 ">
<!-- Link to Project -->
<a class="btn btn-primary btn-sm" href="#">Check it out</a>
</div>
</div>
<!-- Image Carousel -->
<div class="carousel slide showborder" data-ride="carousel">
<div class="carousel-inner ">
<div class="carousel-item active">
<img class="d-block w-100 " src="res/testimg1.jpg">
</div>
<div class="carousel-item">
<img class="d-block w-100 " src="res/testimg2.jpg">
</div>
</div>
</div>
</div>
</div>
If you just want the height of the text column to fill parent row height you can just add to it self-align:stretch.
See this in action: https://codepen.io/matteopieroni/pen/MXdGja
Then you will have to make adjustments in the column children to get the look you are after!
If this can be of your any help.
This align image beside the card.
Here is the fiddle - http://jsfiddle.net/ctudb8o6/
<div class="container">
<div class="card-group">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
Go somewhere
</div>
</div>
<div class="card">
<img class="card-img-left" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22286%22%20height%3D%22180%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20286%20180%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_164697f30e4%20text%20%7B%20fill%3Argba(255%2C255%2C255%2C.75)%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A14pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_164697f30e4%22%3E%3Crect%20width%3D%22286%22%20height%3D%22180%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22107.1953125%22%20y%3D%2296.271875%22%3E286x180%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" alt="Card image cap">
</div>
</div>
</div>
</div>
I'm currently working on Cards from Bootstrap.
Depending on the text title I will get the different height for the cards and would like to have the same height as the tallest one.
I don't mind using JS I actually think is probably the best way to approach the problem.
I have tried using different solutions from the CSS like using flexbox.
The rendered HTML as it is rendered dynamically here's a simple example:
.card {
float: left;
width: 100%;
padding: .75rem;
margin-bottom: 2rem;
border: 0;
box-shadow: 0px 0px 8px 0.3px rgba(0, 0, 0, 1);
}
.card>img {
margin-bottom: .75rem;
display: block;
width: 80%;
height: auto;
margin-left: auto;
margin-right: auto;
}
.card-text {
font-size: 85%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SMITE FR</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/album.css" rel="stylesheet">
<link href="css/ie10-viewport-bug-workaround.min.css" rel="stylesheet">
<script src="https://www.w3schools.com/lib/w3data.js"></script>
<link rel="import" href="navigation.html">
</head>
<body>
<div class="container">
<div class="row">
<div class="card-deck">
<div class="col-md-4 col-sm-6 col-12">
<div class="card">
<img src="images/dieux/Agni.jpg" alt="BeatsX">
<h1 class="card-title">BeatsX</h1>
<div class="text-center">
<p>1188.0000</p>
<p>2017-06-09 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-12">
<div class="card">
<img src="images/dieux/Agni.jpg" alt="Nitendo Switch">
<h1 class="card-title">Nitendo Switch</h1>
<div class="text-center">
<p>2899.0000</p>
<p>2017-06-10 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-12">
<div class="card">
<img src="images/dieux/Agni.jpg" alt="iPhone 7 128GB (Jet Blakc)">
<h1 class="card-title">iPhone 7 128GB (Jet Blakc)</h1>
<div class="text-center">
<p>6388.0000</p>
<p>2017-06-06 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
The Bootstrap 4 columns already use flexbox so they are the same height. Just use h-100 for height:100% on the cards and they'll fill the columns...
https://codeply.com/go/hKhPuxoovH
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-6 col-12">
<div class="card h-100">
<img src="images/dieux/Agni.jpg" alt="BeatsX">
<h1 class="card-title">BeatsX</h1>
<div class="text-center">
<p>1188.0000</p>
<p>2017-06-09 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-12">
<div class="card h-100">
<img src="images/dieux/Agni.jpg" alt="Nitendo Switch">
<h1 class="card-title">Nitendo Switch</h1>
<div class="text-center">
<p>2899.0000</p>
<p>2017-06-10 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-12">
<div class="card h-100">
<img src="images/dieux/Agni.jpg" alt="iPhone 7 128GB (Jet Blakc)">
<h1 class="card-title">iPhone 7 128GB (Jet Blakc)</h1>
<div class="text-center">
<p>6388.0000</p>
<p>2017-06-06 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
</div>
</div>
Also there is no reason to float the cards, and the .col-* should be directly in the .row, not .card-deck
Use card-deck for equal size card this below code works for me
<div class="card-deck">
<div class="card mb-2">
<img class="card-img-top img-fluid" src="//placehold.it/500x180" alt="Card image cap">
<div class="card-body">
<h4 class="card-title">Card title</h4>
<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 mb-2">
<img class="card-img-top img-fluid" src="//placehold.it/500x200" alt="Card image cap">
<div class="card-body">
<h4 class="card-title">Card title</h4>
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.This card has supporting text below as a natural lead-in to additional content.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>
Reference you can find here
As far as I know not doable without either javascript or flexbox (https://osvaldas.info/flexbox-based-responsive-equal-height-blocks-with-javascript-fallback)
Use flex for get it below an example
.main {
display: flex;
}
.child {
flex:1;
border:1px solid tomato;
}
.content {
display: flex;
justify-content: flex-start;
align-items: center;
flex-flow: column nowrap;
}
.content-child{
padding: 5px;
}
<div class="main">
<div class="child">
<div class="content">
<div class="content-child">
<p>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 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>
<div class="content-child">
<p>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 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>
</div>
</div>
<div class="child"></div>
</div>
Try giving height to card see this fiddle
.card {
float: left;
width: 100%;
padding: .75rem;
height:80vh;
margin-bottom: 2rem;
border: 0;
box-shadow: 0px 0px 8px 0.3px rgba(0,0,0,1);
}
Using Flexbox you got the equal height of the card
.card-deck {
display:flex;
flex-wrap: wrap;
}
.card {
float: left;
width: 100%;
height:100%;
padding: .75rem;
margin-bottom: 2rem;
border: 0;
box-shadow: 0px 0px 8px 0.3px rgba(0,0,0,1);
}
.card > img {
margin-bottom: .75rem;
display: block;
width: 80%;
height: auto;
margin-left: auto;
margin-right: auto;
}
.card-text {
font-size: 85%;
}
#media (max-width:767px){
.card-deck {
display:block;
}
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="card-deck">
<div class="col-md-4 col-sm-6 col-12">
<div class="card">
<img src="images/dieux/Agni.jpg" alt="BeatsX">
<h1 class="card-title">BeatsX</h1>
<div class="text-center">
<p>1188.0000</p>
<p>2017-06-09 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-12">
<div class="card">
<img src="images/dieux/Agni.jpg" alt="Nitendo Switch">
<h1 class="card-title">Nitendo Switch</h1>
<div class="text-center">
<p>2899.0000</p>
<p>2017-06-10 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 col-12">
<div class="card">
<img src="images/dieux/Agni.jpg" alt="iPhone 7 128GB (Jet Blakc)">
<h1 class="card-title">iPhone 7 128GB (Jet Blakc)</h1>
<div class="text-center">
<p>6388.0000</p>
<p>2017-06-06 10:00:00</p>
Voir la Fiche
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-4 d-flex align-items-stretch">
<!--YOUR CARD HERE-->
</div>
</div>
</div>
I have this site:
http://avocat2.dac-proiect.ro/?page_id=17
This is code HTML:
<div class="container-fluid">
<p class="text-center" style="color:white">Hello World!</p>
<p class="text-center" style="color:white">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br>
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequa</p>
<div class="row">
<div class="col-sm-4 col-md-4 col-lg-4" style="">
<p><img src="wp-content/themes/WordPressBootstrap-master/images/b1.jpg" class="img-responsive center-block" alt="Cinque Terre">
</p></div>
<div class="col-sm-4 col-md-4 col-lg-4" style="">
<img src="wp-content/themes/WordPressBootstrap-master/images/b2.jpg" class="img-responsive center-block" alt="Cinque Terre">
</div>
<div class="col-sm-4 col-md-4 col-lg-4" style="">
<img src="wp-content/themes/WordPressBootstrap-master/images/b3.jpg" class="img-responsive center-block" alt="Cinque Terre">
</div>
<p></p></div>
</div>
I want this item to be aligned vertically at the center, for all resolutions.
Currently the resolution looks like:
http://i61.tinypic.com/2wh4e4g.jpg
This is code CSS:
.entry-content2
{
background:url("http://avocat2.dac-proiect.ro/wp-content/themes/WordPressBootstrap-master/images/BODY-DROP.png");
width:100%;
height: 100vh;
}
How can I solve this problem?
I tried several options but unfortunately looks different in several resolutions.
Thanks in advance!
Let's use flex box for this!
.container-fluid{
height: 100vh;
display:flex;
align-items:center;
justify-content:center;
}
Here I used the viewport vertical unit to make the container be the frame size.
Then I make the display to be flex, and some flex-ish centering.
But, do not forget to add a div inside .container-fluid, like this:
<div class="container-fluid">
<div class="hola">
...(rest of content)
</div>
</div>
Call it whatever you like and style however you want that div, as you'd avoid a centering mess due to flex box only affecting the father div.