JSFiddle - React, Tailwind, and code Playground
by LuckyCat
HTML
<div class="header">
Header
</div>
<main class="main-section">
<div class="photo-block">1 Photo</div>
<div class="slogan-block">2 Text</div>
<div class="reg-form-block">
3 Form<br>
3 Form<br>
3 Form<br>
3 Form<br>
</div>
</main>
CSS
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body,
.wrapper {
min-height: 100%;
height: 100%;
}
.main-section {
display: flex;
flex-direction: column;
flex-wrap: wrap;
/*height: 300px;*/
margin: 0;
padding: 0;
list-style-type: none;
width: 500px;
/*height: 430px;*/
/* !!! */
margin: 0 auto;
justify-content: center;
}
.main-section div {
/*height: 80px;*/
border: solid;
width: 100%;
margin: 0;
order: 5;
}
li:nth-child(odd) {
/*height: 40px;*/
}
.photo-block {
/*height: 100%;*/
width: 260px;
height: 360px;
margin: 0 auto;
}
.photo-block {
order: 2;
}
.slogan-block {
order: 1;
}
.reg-form-block {
order: 3;
}
/*@media screen and (max-width: 500px) {*/
/* start desctop*/
@media screen and (min-width: 700px) {
body {
background: green;
}
.main-section {
height: 430px;
/* !!! */
}
.main-section div {
width: 50%;
}
.photo-block {
width: 315px;
height: 430px;
/* !!! */
}
.photo-block {
order: 1;
}
.slogan-block {
order: 2;
}
}