# grid system
A simple grid system with 4 screen sizes (sm, md, lg, xl) build using Flex-box CSS3 prooperties & it based on bootstrap media query sizes to make your design responsive with maximum media resolutions
# Install
avaliable installing ways, choose one of them
- npm
npm install --save @mohssineaboutaj/grid-system
yarn add --save @mohssineaboutaj/grid-system
https://mohssineaboutaj.github.io/grid-system/css/grid-system.min.css
css/grid-system.css
or
css/grid-system.min.css
then follow usage steps bellow
NOTE: If you wanto to use npm or yarn you need to download Nodejs
# usage
-
Import css file
Note: dont forget to replace the PATH_OF_CSS_FILE with a real path of the css file<link rel="stylesheet" href=PATH_OF_CSS_FILE />
-
Use css classes
<div class="row"> <div class="grid md-6-and-up"> size 6 columns in medium screens & up </div> <div class="grid md-6-and-up"> size 6 columns in medium screens & up </div> </div>
# browser support
this framework support any browser support the Flex-box properties, here is a table of the browsers supported
# | browser | minimum version |
---|---|---|
chrome | 29 | |
internet explorer | 11 | |
firefox | 22 | |
safari | 10 | |
opera | 48 |
# basic grid
A basic columns usage with & without row wrapping
no wrapping
show 4 columns in every screen without any wrapping
column 1 of 4
column 2 of 4
column 3 of 4
column 4 of 4
<div class="row no-wrap">
<div class="grid">column 1 of 4</div>
<div class="grid">column 2 of 4</div>
<div class="grid">column 3 of 4</div>
<div class="grid">column 4 of 4</div>
</div>
with wrapping
show 4 columns in every screen with wrapping mode
column 1 of 4
column 2 of 4
column 3 of 4
column 4 of 4
<div class="row">
<div class="grid">column 1 of 4</div>
<div class="grid">column 2 of 4</div>
<div class="grid">column 3 of 4</div>
<div class="grid">column 4 of 4</div>
</div>
# in one screen
make a special grid using -only suffix after your class
grid 3 in lg only & grid 6 in other screens
grid 3 in lg only & grid 6 in other screens
grid 3 in lg only & grid 6 in other screens
grid 3 in lg only & grid 6 in other screens
<div class="row">
<div class="grid-6 lg-3-only">grid 3 in lg only & grid 6 in other screens</div>
<div class="grid-6 lg-3-only">grid 3 in lg only & grid 6 in other screens</div>
<div class="grid-6 lg-3-only">grid 3 in lg only & grid 6 in other screens</div>
<div class="grid-6 lg-3-only">grid 3 in lg only & grid 6 in other screens</div>
</div>