https://github.com/faiqa-batool/css-flexbox
This repository includes the practice code I implemented while learning CSS Flexbox
https://github.com/faiqa-batool/css-flexbox
Last synced: 2 months ago
JSON representation
This repository includes the practice code I implemented while learning CSS Flexbox
- Host: GitHub
- URL: https://github.com/faiqa-batool/css-flexbox
- Owner: Faiqa-batool
- Created: 2024-07-01T19:30:12.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-07-05T20:09:11.000Z (12 months ago)
- Last Synced: 2025-04-18T01:48:10.330Z (2 months ago)
- Language: CSS
- Size: 33.2 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CSS-Flexbox
This repository includes the practice code I implemented while learning CSS FlexboxFlexbox is applied to position the elements easily
We apply display: flex; to the parent div, so that the flexbox sets the position of the child divs
### Before applying flexbox:
### After Applying Flexbox:
display: flex;

### Justify-content : center;
/flex-start /flex-end /space-betwen /space-evenly /space-around
//align item horizontally
### align-items: center;
// align items vertically

But it depends on flex-direction, that is row by default.
### flex-direction: column;

### flex-direction: column-reverse;

### flex-direction: row-reverse;

### Flex-axes concept:

Justify-content works along main-axis
### flex-wrap: wrap;
### align-content: center;

There is no justify-items in flexbox
### flex-flow property:
flex-flow:
the above was container properties. Now we will discuss item properties.
### Order property:
Change item’s order by using css, the higher the order, the last the item //bd me show hoga
Order 1 will come first, after all the non-order items
Default order is 0, that’s why all the other items will come first.### flex-grow:
flex-grow:1; // all the items take equal space in the container, full width.
### flex-shrink:2;
Ability of a flexbox to shrink
2 means--> it will shrink with the double speed### align-self:
align-self --> only that particular item of flexbox will align separately
#### align-self: flex-end;
#### align-self: flex-start;
