Box-Flex Property In CSS3
It specifies whether the child elements of a box is
flexible or inflexible in size
Syntax:
box-flex: value;
Complete Program:
- <head>
- <style type="text/css">
- div {
- display: box;
- display: -webkit-box;
-
- display: -moz-box;
-
- width: 300px;
- border: 1px solid black;
- }
-
- #p1 {
- box-flex: 5.0;
- -moz-box-flex: 5.0;
-
- -webkit-box-flex: 5.0;
-
- border: 1px solid Blue;
- }
-
- #p2 {
- box-flex: 5.0;
- -moz-box-flex: 5.0;
-
- -webkit-box-flex: 5.0;
-
- border: 1px solid Pink;
- }
- </style>
- </head>
-
- <body>
- <div>
- <p id="p1">My Name is</p>
- <p id="p2">Mahak Gupta</p>
- </div>
- </body>
-
- </html>
Output