You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

848 lines
29 KiB

---
layout : 'default'
css : 'Grid'
title : 'Grid'
description : 'A grid is a structure used to harmonize negative space in a layout'
type : 'UI Collection'
---
<%- @partial('header') %>
<div class="main container">
<div class="peek">
<div class="ui vertical pointing secondary menu">
<a class="active item">Standard</a>
<a class="item">Elements</a>
<a class="item">Types</a>
<a class="item">Variations</a>
</div>
</div>
<h2 class="ui dividing header">Standard</h2>
<div class="highlighted example">
<h4 class="ui header">Grid</h4>
<p>A grid is made up of columns of content with gutters to provide negative space between columns.</p>
<div class="ui ignore green message"><i class="icon heart"></i>All grid systems must assume an arbitrary amount of column rows. Semantic by default assumes <b>16 columns</b></div>
<div class="ui grid">
<div class="four wide column">
<div class="ui segment">
</div>
</div>
<div class="four wide column">
<div class="ui segment">
</div>
</div>
<div class="four wide column">
<div class="ui segment">
</div>
</div>
<div class="four wide column">
<div class="ui segment">
</div>
</div>
</div>
</div>
<h2 class="ui dividing header">Elements</h2>
<div class="highlighted example">
<h4 class="ui header">Rows</h4>
<p>A row is used to create vertical padding between groups of columns on a page. If no rows are specified columns will sit flush vertically.</p>
<div class="ui grid">
<div class="row">
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
<div class="column">
<div class="ui segment">
A
</div>
</div>
</div>
<div class="row">
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
<div class="column">
<div class="ui segment">
B
</div>
</div>
</div>
</div>
</div>
<div class="highlighted example">
<h4 class="ui header">Columns</h4>
<p>Columns each contain gutters giving them equal vertical spacing from other columns. Columns by default do not take up their entire row height.</p>
<div class="ui three column grid">
<div class="column">
<div class="ui segment">
1
</div>
</div>
<div class="column">
<div class="ui segment">
2
</div>
</div>
<div class="column">
<div class="ui segment">
3
</div>
</div>
<div class="column">
<div class="ui segment">
4
</div>
</div>
</div>
</div>
<h2 class="ui dividing header">Types</h2>
<div class="example">
<h4 class="ui header">Page Grid</h4>
<p>A page grid exists on the top level of a web site. It can change its left and right gutter size to be responsive to a browser's width. This means the gutters to left and right of grid columns will alter in size as a browser's resolution increases.</p>
<div class="ui text message info ignore">
<i class="icon heart"></i> Semantic UI's page grid by default will change the page gutters to increase at 250pixel intervals.
</div>
<div class="ui two column page grid">
<div class="column">
<div class="ui labeled vertical fluid inverted icon menu">
<a class="item">
<i class="icon mail"></i>
Mail
</a>
<a class="item">
<i class="icon lab"></i>
Lab
</a>
<a class="item">
<i class="icon star"></i>
Favorites
</a>
</div>
</div>
<div class="column">
<div class="ui segment">
<b>Inbox</b>
<p>Welcome to your inbox. Would you like to see more information?</p>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Divided Grid</h4>
<p>A grid can have dividers between columns</p>
<div class="ui six column divided grid">
<div class="row">
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div>
<div class="row">
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Vertically Divided Grid</h4>
<p>A grid can have dividers between rows</p>
<div class="ui vertically divided grid">
<div class="two column row">
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div>
<div class="three column row">
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Celled Grid</h4>
<p>A grid can have rows divided into cells</p>
<div class="ui celled grid">
<div class="row">
<div class="two wide column" style="">
<p>Lorem ipsum do</p>
</div>
<div class="three wide column" style="">
<p>Lorem ipsum dolor </p>
</div>
<div class="seven wide column">
<p>Lorem ipsum dolor sitos. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div>
<div class="row">
<div class="five wide column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="three wide column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="two wide column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
<div class="two wide column">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div>
</div>
</div>
<h2 class="ui dividing header">Variations</h2>
<h3 class="ui header">Grid</h3>
<div class="example">
<h4 class="ui header">Specifying Column Count Per Row</h4>
<p>A grid can have a different number of columns per row</p>
<div class="ui two column grid">
<div class="column">
<div class="ui fluid form segment">
<h3 class="ui header">Log-in</h3>
<div class="field">
<label>Username</label>
<input placeholder="Username" type="text">
</div>
<div class="field">
<label>Password</label>
<input type="password">
</div>
<div class="ui blue submit button">Login</div>
</div>
</div>
<div class="column">
<div class="ui fluid form segment">
<h3 class="ui header">Register</h3>
<div class="two fields">
<div class="field">
<label>First Name</label>
<input placeholder="First Name" type="text">
</div>
<div class="field">
<label>Last Name</label>
<input placeholder="Last Name" type="text">
</div>
</div>
<div class="field">
<label>Username</label>
<input placeholder="Username" type="text">
</div>
<div class="field">
<label>Password</label>
<input type="password">
</div>
<div class="inline field">
<div class="ui checkbox">
<input type="checkbox" id="terms" />
<label for="terms"></label>
</div>
<label>I agree to the terms and conditions</label>
</div>
<div class="ui blue submit button">Submit</div>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Relaxed</h4>
<p>A grid can increase its gutters to allow for more negative space</p>
<div class="ui two column relaxed grid">
<div class="column">
<div class="ui fluid form segment">
<h3 class="ui header">Log-in</h3>
<div class="field">
<label>Username</label>
<input placeholder="Username" type="text">
</div>
<div class="field">
<label>Password</label>
<input type="password">
</div>
<div class="ui blue submit button">Login</div>
</div>
</div>
<div class="column">
<div class="ui fluid form segment">
<h3 class="ui header">Register</h3>
<div class="two fields">
<div class="field">
<label>First Name</label>
<input placeholder="First Name" type="text">
</div>
<div class="field">
<label>Last Name</label>
<input placeholder="Last Name" type="text">
</div>
</div>
<div class="field">
<label>Username</label>
<input placeholder="Username" type="text">
</div>
<div class="field">
<label>Password</label>
<input type="password">
</div>
<div class="inline field">
<div class="ui checkbox">
<input type="checkbox" id="terms" />
<label for="terms"></label>
</div>
<label>I agree to the terms and conditions</label>
</div>
<div class="ui blue submit button">Submit</div>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Stackable Grid</h4>
<p>A grid can have its columns stack on-top of each other after reaching mobile breakpoints</p>
<div class="ui text message info ignore">
<i class="icon heart"></i> To see a grid stack, try resizing your browser to a small width
</div>
<div class="two column stackable ui grid">
<div class="column">
<div class="ui segment">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div>
<div class="column">
<div class="ui segment">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Text Alignment</h4>
<p>A grid can specify its text alignment</p>
<div class="ui center aligned three column grid">
<div class="row">
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Cats
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Dogs
</div>
<div class="item">
Poodle
</div>
<div class="item">
Cockerspaniel
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Monkeys
</div>
</div>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Vertical Alignment</h4>
<p>A grid can specify its vertical alignment to have all its columns vertically centered.</p>
<div class="ui middle aligned three column grid">
<div class="row">
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Cats
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Dogs
</div>
<div class="item">
Poodle
</div>
<div class="item">
Cockerspaniel
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Monkeys
</div>
</div>
</div>
</div>
</div>
</div>
<h3 class="ui header">Rows</h3>
<div class="example">
<h4 class="ui header">Responsive to Device</h4>
<p>A grid can have its columns, or rows only show content for computer, tablet, or mobile.</p>
<div class="ui text message info ignore">
<i class="icon heart"></i> Breakpoints are 768 for mobile, 768-998 for tablet and 998 for pc</i>
</div>
<div class="ui grid">
<div class="two column mobile only row">
<div class="column">
<div class="ui segment">
Mobile
</div>
</div>
<div class="column">
<div class="ui segment">
Mobile
</div>
</div>
</div>
<div class="three column row">
<div class="computer only column">
<div class="ui segment">
Computer
</div>
</div>
<div class="tablet mobile only column">
<div class="ui segment">
Tablet and Mobile
</div>
</div>
<div class="column">
<div class="ui segment">
All Sizes
</div>
</div>
<div class="column">
<div class="ui segment">
All Sizes
</div>
</div>
</div>
<div class="four column computer only row">
<div class="column">
<div class="ui segment">
Computer
</div>
</div>
<div class="column">
<div class="ui segment">
Computer
</div>
</div>
<div class="column">
<div class="ui segment">
Computer
</div>
</div>
<div class="column">
<div class="ui segment">
Computer
</div>
</div>
</div>
<div class="three column tablet only row">
<div class="column">
<div class="ui segment">
Tablet
</div>
</div>
<div class="column">
<div class="ui segment">
Tablet
</div>
</div>
<div class="column">
<div class="ui segment">
Tablet
</div>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Equal Height</h4>
<p>A row can specify that it is equal height so all of its columns appear the length of its longest column.</p>
<div class="ui three column grid">
<div class="equal height row">
<div class="column" style="background-color:#F0F0FF;">
<p>This is a short row</p>
</div>
<div class="column" style="background-color:#F0F0FF;">
<p>This is a short row</p>
</div>
<div class="column" style="background-color:#F0F0FF;">
<p>This is a very long row with lots of text in it and way more text than the other rows</p>
<p>It might even span for multiple paragraphs.</p>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Vertical Alignment</h4>
<p>A row can also specify its vertical alignment to have its columns vertically centered.</p>
<div class="ui three column grid">
<div class="top aligned row">
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Cats
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Dogs
</div>
<div class="item">
Poodle
</div>
<div class="item">
Cockerspaniel
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Monkeys
</div>
</div>
</div>
</div>
<div class="middle aligned row">
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Dogs
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Dogs
</div>
<div class="item">
Poodle
</div>
<div class="item">
Cockerspaniel
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Monkeys
</div>
</div>
</div>
</div>
<div class="bottom aligned row">
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Cats
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Dogs
</div>
<div class="item">
Poodle
</div>
<div class="item">
Cockerspaniel
</div>
</div>
</div>
<div class="column">
<div class="ui vertical fluid menu">
<div class="header item">
Monkeys
</div>
</div>
</div>
</div>
</div>
</div>
<h3 class="ui header">Columns</h3>
<div class="example">
<h4 class="ui header">Floating</h4>
<p>A column can be "floated" to either the left or right of its row.</p>
<div class="ui grid">
<div class="left floated four wide column">
<div class="ui vertical fluid menu">
<div class="header item">
Dogs
</div>
<div class="item">
Poodle
</div>
<div class="item">
Cockerspaniel
</div>
</div>
</div>
<div class="right floated four wide column">
<div class="ui vertical fluid menu">
<div class="header item">
Cats
</div>
<div class="item">
Abysinnian
</div>
<div class="item">
Sphynx
</div>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Column Width</h4>
<p>A column can vary in width taking up more than a single grid column.</p>
<div class="ui grid">
<div class="three wide column">
<div class="ui segment"><b>Colume One</b> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum iaculis sapien.</div>
</div>
<div class="six wide column">
<div class="ui segment"><b>Colume Two</b> Aliquam lobortis commodo sem ac accumsan. Vestibulum non faucibus lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur sed lorem lorem. Nam augue erat, dignissim nec aliquam vel, congue et sapien. Integer viverra justo vel nibh suscipit commodo. Nullam ut turpis nibh, in luctus risus. Sed ut risus nec dui mattis porta. Nam nisi magna, ornare mollis congue a, suscipit at nisl.</div>
</div>
<div class="three wide column">
<div class="ui segment"><b>Colume Three</b> Donec semper mollis condimentum. Aenean eget rutrum magna. Mauris ornare nibh scelerisque turpis lobortis dignissim. Etiam eleifend justo eget quam semper vulputate. Nulla et risus convallis velit molestie iaculis. Aliquam erat volutpat. </div>
</div>
</div>
</div>
</div>