How to make Responsive Web Design with Flexbox Using 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.
*{
box-sizing: border-box;
}
body{
margin: 0px;
}
.mp{
display: flex;
flex-wrap: wrap;
width: calc(100vw-10px);
height: 100vh;
background-color: rgb(123, 117, 117);
padding: 10px;
gap:10px;
}
.p1{
display: flex;
width: 100%;
height: 19%;
align-items: center;
justify-content: center;
background-color: rgb(232, 52, 125);
border-color: black;
border-style: solid;
border-width: 3px;
}
.p2{
display: flex;
width: 100%;
height: 60%;
gap:10px;
}
.p3{
display: flex;
width: 100%;
height: 19%;
align-items: center;
justify-content: center;
background-color: rgb(18, 169, 154);
border-color: black;
border-style: solid;
border-width: 3px;
}
.p2c1{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 30%;
height: 100%;
background-color: rgb(35, 236, 240);
border-color: black;
border-style: solid;
border-width: 3px;
}
.p2c2{
display: flex;
flex-wrap: wrap;
width: 70%;
height: 100%;
gap:5px;
}
.p2c2g1{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: rgb(230, 172, 132);
border-color: black;
border-style: solid;
border-width: 3px;
}
@media screen and (max-width:1024px) {
.p2{
flex-direction: column;
}
.p2 div{
width: 100%;
}
.p1,.p2{
height: calc(20%-10px);
}
}
@media screen and (max-width:630px) {
.p2{
flex-direction: column;
}
.p2 div{
width: 100%;
}
.mp{
height: 180vh;
}
}
.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 Responsive Web Design with Flexbox 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