HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> #parent{ display: flex; width: 100%; border: 1px solid #8c8c8c; width:500px; } #parent > div{ border:1px solid #267326; padding:25px 0; text-align:center; flex-basis: 100px; -webkit-flex-basis: 100px; } #parent > div:nth-child(2){ flex-basis: 200px; -webkit-flex-basis: 200px; } </style> </head> <body> <h1>CSS flex-basis Property</h1> <div id="parent"> <div>Div 1</div> <div>Div 2</div> <div>Div 3</div> </div> <p><strong>Note</strong>: In this example, basic length of the 'Div2' is 200px.</p> </body> </html>
OUTPUT
×

Save as Private