Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Page Layout based on Semantic-UI Grid: cannot remove the gutters

I am creating a web application using semantic-ui. I am trying to create a layout which has a sidebar and main content area. At first, I thought using grid would be the way to go, except that they cause a few problems:

  1. The columns and rows will have extra spacing/gutters between them
  2. The only way to "remove" the gutters is to set a column color with something like <div class="four wide black column">, but this causes the columns to overlap with other content

So it seems that grid are not the best tool for creating page layouts, although they do provide functionality which makes them useful for page layouts (like defining section sizes; four wide column, ten wide column, etc)

What is the recommended way to layout web applications using Semantic-UI, such as a simple sidebar and main content columns?

like image 382
user2840647 Avatar asked Dec 15 '15 08:12

user2840647


People also ask

Is Semantic UI react responsive?

Both React and Semantic UI luckily make responsive design relatively easy with built-in components.

Is Semantic UI responsive?

Since variations in Semantic UI are only assigned in the scope of components, there are no "free floating" responsive class names, however some components include responsive variations to help ease responsive design. Grid for example, includes responsive classes for hiding or showing column , row based on device type.


1 Answers

Why don't you override the default margin and padding applied for "grid" and "column" like this,

.your-custom-class.grid {
    margin: 0;
}
.your-custom-class.grid .column {
    padding: 0;
}

Thus you'll get a grid with no space in between the columns.

like image 146
Sandeep C. Nath Avatar answered Oct 06 '22 19:10

Sandeep C. Nath