Flex box

Developer
Size
2,171 Kb
Views
6,072

How do I make an flex box?

What is a flex box? How do you make a flex box? This script and codes were developed by Tommy on 30 December 2022, Friday.

Flex box Previews

Flex box - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Flex box</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; margin: 0;
}
.container { display: flex; width: 400px; border: 1px solid #000; margin: 10px auto;
}
.box { width: 120px; flex: 1 1 auto; transition: all 0.7s ease-out; height: 100px;
}
.box:hover { width: 200px;
}
.box:nth-child(1) { background-color: #0055A4;
}
.box:nth-child(2) { background-color: #FFFFFF;
}
.box:nth-child(3) { background-color: #EF4135;
}
.row { display: flex; flex-direction: row; width: 300px;
/* border: 1px solid #000;
*/ padding: 10px; background-color: #ddd;
}
.row>p:first-child:after { content: ":"; margin-right: 10px;
}
.row p:nth-child(2) { border-bottom: 1px solid #000; flex: 1;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="container"> <p class="box">box1</p> <p class="box">box2</p> <p class="box">box3</p>
</div>
<hr />
<div class="row"> <p>label</p> <p>content</p>
</div>
<div class="row"> <p>labelhoe</p> <p>hoehoe</p>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Flex box - Script Codes CSS Codes

* { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; margin: 0;
}
.container { display: flex; width: 400px; border: 1px solid #000; margin: 10px auto;
}
.box { width: 120px; flex: 1 1 auto; transition: all 0.7s ease-out; height: 100px;
}
.box:hover { width: 200px;
}
.box:nth-child(1) { background-color: #0055A4;
}
.box:nth-child(2) { background-color: #FFFFFF;
}
.box:nth-child(3) { background-color: #EF4135;
}
.row { display: flex; flex-direction: row; width: 300px;
/* border: 1px solid #000;
*/ padding: 10px; background-color: #ddd;
}
.row>p:first-child:after { content: ":"; margin-right: 10px;
}
.row p:nth-child(2) { border-bottom: 1px solid #000; flex: 1;
}
Flex box - Script Codes
Flex box - Script Codes
Home Page Home
Developer Tommy
Username hoehoe
Uploaded December 30, 2022
Rating 3
Size 2,171 Kb
Views 6,072
Do you need developer help for Flex box?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tommy (hoehoe) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!