sudhakarinfotech
(current)
Run Code
Live Code Editor- CSS align-self: flex-start Property
Source Code
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>The align-self Property</title> <style> .flex-container { display: flex; flex-direction:row; background-color:lightgray; height:200px; } .flex-item{ background-color:orange; color:white; text-align:center; width:200px; margin:10px; padding:10px; } .bg-info{ background-color:#17A2B8; } .bg-primary{ background-color:#007BFF; } .bg-warning{ background-color:#FFC107; } </style> </head> <body> <h1>The align-self:flex-start Property</h1> <div class="flex-container"> <div class="flex-item bg-info" >1</div> <div class="flex-item bg-primary" style="align-self:flex-start;">2</div> <div class="flex-item bg-warning">3</div> <div class="flex-item bg-info">4</div> </div> </body> </html>
Source Code Output :
Running