Nixon Galario / Nixon Galario
Front-End Developer
Web design is not as good today
33% of users were still browsing with IE5 in mid-2003, impossible to make a tableless website that would render in IE5 properly
Mobile Wap!
Media Queries!
Original Flexbox as working draft. Chrome and Safari has partial support uses Old syntax *box
.flex-container {
display : box ; /* old */
}
Partially supported by webkit browsers but then spec killed!
Arrival of Flexbox Spec also known as Tweener Spec only implemented in IE10. You should avoid it if possible.
Modern Spec Revision and it is the new hotness!, with excellent browser support
Time now and beyond!
The Flexbox Layout officially called CSS Flexible Box Layout Module is new layout module in CSS3 made to improve the items align, directions and order in the container even when they are with dynamic or even unknown size.
Some points :
-Flexbox is Flexible! You can grow or shrink and flex to fit available space.
-Easy alignment means less Headache for accurate measurements
-Item order (not on javascript!)
- Easy syntax :D
Image credit: Flexbox Cheatsheet
.flex-container {
display : flex ;
flex-direction : row ; /* default / aligns left*/
}
.flex-container {
display : flex ;
flex-direction : column ; /* default / aligns left*/
}
.flex-container {
flex-direction : row-reverse ; /* aligns right / like float right */
}
.flex-container {
flex-direction : column-reverse ;
}
wrap || wrap-reverse || nowrap
.flex-container {
flex-wrap: wrap; /* nowrap || wrap-reverse */
}
.flex-container {
Flex-Flow : /* row wrap */
}
Default value: row nowrap
.flex-item:first-child {
-webkit-order: /integer/; /* Safari */
order: /integer/;
}
justify-content: center;
Float
Width
Clear
Float
Width
Clear
flex : 1 ;
.flex-container {
/*display: flex;
flex-flow: row wrap;*/
}
.nav {
/*flex: 1;*/
/* order: 1; */
}
.content {
/*flex: 4;*/
}
.sidebar {
/*flex: 2;*/
}
.header,
.footer {
/*flex: 100%;*/
text-align: center;
}
@media (max-width: 700px) {
.nav {
flex: 100%;
}
.nav li {
display: inline;
}
}
@media (max-width: 500px) {
.content,
.sidebar {
flex: 100%;
}
}
Height problem
it gives ideal adjusting responsiveness !!
Solve it hereFlexible layouts
Distribute Extra Space
Align Content
Align Items on container or individually
Real World Example
Resource and Example : http://nixongalario.com
Email me : nixongalario@gmail.com