CSS Grid
The CSS Grid Layout Module offers a grid-based layout system, with rows and columns, making it easier to design web pages without having to use floats and positioning.
Display Property:
An HTML element becomes a grid container when its display property is set to grid or inline-grid.
CSS Code:
.grid-container {
display: grid;
}
All direct children of the grid container automatically become grid items. The vertical lines of grid items are called columns while the horizontal lines of grid items are called rows. The spaces between each column/row are called gaps. The grid-column-gap property sets the gap between the columns:
CSS Code:
.grid-container {
display: grid;
grid-column-gap: 50px;
}
The grid-row-gap property sets the gap between the rows:
CSS Code:
.grid-container {
display: grid;
grid-row-gap: 50px;
}
The grid-gap property can also be used to set both the row gap and the column gap in one value.
CSS Code:
.grid-container {
display: grid;
grid-gap: 50px;
}
The lines between columns are called column lines. The lines between rows are called row lines.
Create Stunning Websites and Web Apps
Trying to build out all user interfaces and components for your website or web app from scratch can become a very tedious task. A huge reason why we created Contrast Bootstrap to help reduce the amount of time we spend doing that, so we can focus on building some other aspects of the project. Contrast Bootstrap PRO consists of a UI Kit featuring over 10000+ component variants. Together with a template of 5 admin dashboards and 23+ additional multipurpose pages template for building almost any type of website or web app. You can view a demo and learn more about Contrast by clicking here.
Contrast Bootstrap PRO was built using the most popular CSS framework Bootstrap to help build your next landing, admin SAAS, prelaunch etc. project with a clean, prebuilt and well documented template and UI components. Learn more about contrast.
Resources
- Contrast Design Bootstrap
- Accordion
- Alert
- Animation
- Autocomplete
- Badges
- Box
- Breadcrumb
- ButtonGroup
- Button
- ButtonToolbar
- Card
- Carousel
- Checkbox
- Collapse
- DataTable
- DatePicker
- DropDown
- Footer
- Forms
- Icon
- Iframe
- Input
- InputGroup
- ListGroup
- Mask
- Modal
- Multiselect
- Notification
- Pane
- Panel
- Pop Over
- Progress
- Radio
- Rating
- Select
- Select 2
- Slider
- Spinner
- Stepper
- Switch
- Table
- Forms
- Navbar
- Pagination
- Tab
- Sidebar
- Time Picker
- Data Table
- Fixed Data Table
- Table
- Widgets
Top comments (0)