Foundation Grid - Medium Devices
In the previous chapter we introduced that on small devices we use .small-* class to set, with a grid ratio of 25%/75%:
....
....
On medium devices we recommend a ratio of 50%/50%.
Tip: Medium devices are defined with screen sizes between 40.0625em to 64.0624em and.
Using on medium devices .medium-* class.
Now we add two columns on medium devices:
....
....
The above example sets two columns with a ratio of 25% and 75% (Foundation is mobile-first: if not specified otherwise, large devices will inherit the .small class code):
Small devices use a ratio of 25%/75% (.small-3 and .small-9). But medium devices use a ratio of 50%/50% (.medium-6 and .medium-6) 。
Example
<
div
class=
"row"
<
div
class="small-3 medium-6 columns"
style=
"background-color:yellow;"
<
p
Runoob Tutorial
<
/p
<
/div
<
div
class="small-9 medium-6 columns"
style=
"background-color:pink;"
<
p
Runoob Tutorial
<
/p
<
/div
<
/divTry it »
![]() |
Note: Make sure the column numbers add up to 12 columns! |
|---|
Using only on medium devices
In the following example we specify .medium-6 class (not .small-*). This indicates a 50%/50% ratio on medium or large devices. But on small devices they will stack horizontally (100% width):
Example
<
div
class=
"row"
<
div
class="medium-6 columns"
style=
"background-color:yellow;"
<
p
Runoob Tutorial
<
/p
<
/div
<
div
class="medium-6 columns"
style=
"background-color:pink;"
<
p
Runoob Tutorial
<
/p
<
/div
<
/divTry it »
