Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save faisalahammad/7680740f27d5a8c1dc57172162424215 to your computer and use it in GitHub Desktop.
Save faisalahammad/7680740f27d5a8c1dc57172162424215 to your computer and use it in GitHub Desktop.
Make the List Item Columns Helper Classes responsive for mobile devices.
/**
* Ninja Forms - List Item Columns Helper Classes Mobile Responsive
* @author Faisal Ahammad
*/
/* ---------------------------------
HELPER CLASSES
----------------------------------*/
.two-col-list ul,
.three-col-list ul,
.four-col-list ul,
.five-col-list ul,
.six-col-list ul {
display: flex;
flex-wrap: wrap;
padding: 0;
margin: 0;
list-style: none;
}
.two-col-list li,
.three-col-list li,
.four-col-list li,
.five-col-list li,
.six-col-list li {
width: 100% !important;
}
/** multiple columns for tablet and desktop **/
@media (min-width: 768px) {
.two-col-list li {
width: 50% !important;
}
.three-col-list li {
width: 33.33% !important;
}
.four-col-list li {
width: 25% !important;
}
.five-col-list li {
width: 20% !important;
}
.six-col-list li {
width: 16.66% !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment