How to make Getting Started with Flexbox: Easy Layouts with HTML and CSS.[Source Code]
To make this website, you would like to make two files: an HTML file, a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.
@import url('https://fonts.googleapis.com/css2?family=Hind:wght@300;400;500;600;700&display=swap');
*{
box-sizing: border-box;
}
.container{
margin:0 ;
padding: 0;
background-color:rgb(0, 0, 0) ;
height: 100vh;
width: 100vw;
display: flex;
justify-content: space-evenly;
align-items: center;
flex-direction: column;
}
.p1{
height: 16%;
width: 100%;
background-color: aqua;
}
.p2{
height: 60%;
width: 100%;
background-color: black;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.p3{
height: 16%;
width: 100%;
background-color: red;
}
.s1{
height: 100%;
width: 20%;
flex-direction:column ;
display: flex;
justify-content:space-between ;
}
.s2{
height: 100%;
width: 58%;
background-color: aquamarine;
}
.s3{
height: 100%;
width:20%;
background-color: blanchedalmond;
}
.p1,.p3,.s2,.s3{
display: flex;
justify-content: center;
align-items: center;
}
.d1{
height: 58%;
width: 100%;
background-color: aquamarine;
}
.d2{
height: 39%;
width: 100%;
background-color:honeydew ;
}
.d1,.d2{
display: flex;
justify-content: center;
align-items: center;
}
@media only screen and (max-width: 860px){
.container{
height: 770px;
width: auto;
justify-content: space-evenly;
}
.p1,.p3{
height: 100px;
width: 100%;
}
.p2{
height:540px;
width: 100%;
justify-content: space-evenly;
}
.s1{
height: 200px;
width: 100%;
flex-direction: row;
}
.d1,.d2{
width: 49%;
height: 100%;
}
.s2,.s3 {
height: 150px;
width: 100%;
}
}
@media only screen and (max-width: 550px){
.container{
height: 800px;
}
.p2{
height: 650px;
width: 100%;
justify-content: space-evenly;
}
.s1{
flex-direction: column;
justify-content: space-around;
height: 60%;
width: 100%;
}
.d1,.d2{
height: 80%;
width: 100%;
}
}
.credit a {
text-decoration: none;
color: #121212;
font-weight: 800;
}
.credit {
color: #121212;
text-align: center;
margin-top: 10px;
font-family: Verdana,Geneva,Tahoma,sans-serif;
}
.credit span{
color:#000;
font-size:20px;
}
.credit a {
text-decoration: none;
color: #121212;
font-weight: 800;
}
.credit {
color: #121212;
text-align: center;
margin-top: 10px;
font-family: Verdana,Geneva,Tahoma,sans-serif;
}
.credit span{
color:#000;
font-size:20px;
}
Thank you for reading our blog. If you face any problem in Creating a Flexbox Layout Using HTML and CSS., then contact us or comment to us. We’ll try to provide a solution to your problem as soon as possible.
Explore
Press The Key ' p ' and say ' read article ' our voice assistant read our article.
In Our older post it doesnot work we working on that.
In Our older post it doesnot work we working on that.
Post a Comment
Thank you
Learning robo team