Responsive Web Page -With CSS Flex - Column Code
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="STYLESHEET"type="text/css"href="web.css">
<title>web design</title>
</head>
<body>
<header>Header</header>
<div class="row">
<div class="column"style="background:#aaa;">column</div>
<div class="column"style="background:#bbb;">column</div>
<div class="column"style="background:#ccc;">column</div>
</div>
<div class="footer">footer</div>
</body>
</html>
CSS Flex - Column Style
*{
box-sizing: border-box;
}
body{
font-family: Arial, Helvetica, sans-serif;
}
header{
background-color:#f1f1f1;
padding:30px;
text-align: center;
font-size:35px ;
}
.row{
display: flex;
display: -webkit-flex;
}
.column{
-webkit-flex:1;
-ms-flex: 1;
flex: 1;
padding:20px;
height:300px;
}
.footer{
background-color: #f1f1f1;
padding:10px;
text-align: center;
}
No comments:
Post a Comment