Answers for "flex css"

CSS
6

display flex column

.container {
	display: flex;
	flex-direction: column;
}
Posted by: Guest on March-21-2020
2

flex wrap css

<style> 
#datadiv {
  width: 200px;
  height: 200px;
  border: 1px solid #c3c3c3;
  display: flex;
  flex-wrap: wrap;
}

#datadiv div {
  width: 50px;
  height: 50px;
}
</style>
</head>
<body>

<h1>The flex-wrap Property</h1>

<div id="datadiv">
  <div style="background-color:red;">A</div>
  <div style="background-color:green;">B</div>
  <div style="background-color:yellow;">C</div>
  <div style="background-color:blue;">D</div>
  <div style="background-color:cyan;">E</div>
  <div style="background-color:indigo;">F</div>
</div>
Posted by: Guest on April-20-2020
0

make the first item at the very top of the screen

.fixedElement {
    position:fixed;
    top:0;
    width:100%;
    z-index:100;
}
Posted by: Guest on March-28-2020
37

css flexbox syntax

Display: flex 
Flex-direction: row | row-reverse | column | column-reverse
align-self: flex-start | flex-end | center | baseline | stretch
justify-content: start |  center | space-between | space-around | space-evenly
Posted by: Guest on October-21-2020
3

flexbox in css

/* 
  Most Common Flexbox properties:

    display: flex; 
    flex-direction: row / column;     --> used to justify the direction of content
    flex-wrap: wrap;                  --> holds the content inside flexbox container

  These Properties are also part of flexbox and only apply on a container which contain flexbox property

  Justify content:
    center
    start
    end
    baseline
    space-around -->commonly used

  Align items:
    center  
    baseline
    
  fr = fill up any available space

*/

.flexbox {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    /* column-count: 2;
  columns: 2; */
}
Posted by: Guest on May-29-2021
0

flex css

.container {
  flex-direction: row | row-reverse | column | column-reverse;
}
Posted by: Guest on September-20-2021

Browse Popular Code Answers by Language