I tried to put a "#columnCount: 24;" in src/site/globals/site.variables and execute "gulp build" but it turns out there is nothing changed.
Another doubt is even if this works, can I use something like "twenty wide column" for my page elements?
Directly from the Semantic UI website :
All grid systems use an arbitrary column count. Semantic's default theme assumes 16 columns. This number can be adjusted in your project by adjust the #columnCount value in site.variables.
The #columnCount variable can only go up to 16.
Since Semantic-UI was built with a 16 column default, all the other related variables and calculations are based off that. In order to go higher than 16 columns you'll have to find the appropriate places and add the necessary variables, calculations, and classes in order to make it work.
However, there are a couple of easier ways that I think you could accomplish what you're looking for.
First, rather than adding in more columns, you might be able to accomplish what you're looking for by changing the margins and paddings of the appropriate elements or possibly by using the "relaxed" or "very relaxed" classes.
But if you absolutely need that many columns, then try using nested grids.
Something like this perhaps:
<div class="ui two column grid">
<div class="column">
<div class="ui ten column grid">
</div>
</div>
<div class="column">
<div class="ui ten column grid">
</div>
</div>
</div>
Related
I'm a super, super noob and need your help.
What I'm trying to achieve is layout kinda flexible in a column but still in rows, like on a picture below, there are 3 rows, each in a different color. I tried 3 rows as well as 1 row, doesn't make a difference.
Ok, so I got 9 columns, each one takes 4 spaces. And I tried to move the middle picture in a green row to the middle column of the pink one. Didn't work out, I mean it did but the other pictures got messed up. I also tried the .clearfix.
Hope you can help guys, cheers!
What you are trying to achieve is called a Masonry Layout.
You cannot distribute your layout by rows, you have to do it using columns.
Everything should be inside a .row div, and have the number of columns you need (in your image case, you need to use .col-md-4).
Then you should add everything to those three columns dynamically, using Javascript or the technology you are using (you can achieve it also on PHP or so on, I'll edit if you need help on that).
Also, I recommend you using Bootstrap 4, as it contains a new feature called Cards Columns which is designed for what you are trying to achieve:
https://v4-alpha.getbootstrap.com/components/card/#card-columns
Bootrstap has different classes to achieve this.
Primarily,
<div class="row">
And
<div class="col">
The row class defines the row, and the col class defines the column.
You specify the columns by col-1, col-2, col-3 as an example, all the way up to col-12. If you don't defined the col size, it will automatically fill out as much space as possible, up the size of col-12.
There are tons of nested classes to alter the behavior as well, such as text placement within the elements etc.
This row and column system is also fully responsive.
Read more here.
If you can't achieve the desired result by using bootstrap rows and cols,
try using flexbox instead. More info here.
you can use the nav bar for the upper position but bootstrap doesnt provide classes to break the columns into rows rather it provides to break the rows into columns only.you have to use html css and jquery here.
You won't be able to align top->bottom fashion with bootstrap. The only method I could find which can provide appealing result is the DeSandro's masonry library (https://masonry.desandro.com/) if you are restricted to Bootstrap 3. In case you can use Bootstrap 4 cards (card columns) can provide some features or you can also look at isotope by DeSandro.
But staying with the mentioned masonry plugin:
<div class="container">
<div class="my-card col-lg-4 col-md-4 col-sm-4">
Content 1
</div>
<div class="my-card col-lg-4 col-md-4 col-sm-4">
Content 2
</div>
<div class="my-card col-lg-4 col-md-4 col-sm-4">
Content 3
</div>
<div class="post-box col-lg-4 col-md-4 col-sm-4">
Content 4
</div>
<div class="post-box col-lg-4 col-md-4 col-sm-4">
Content 5
</div>
<!-- ... -->
</div>
and JavaScript:
$(document).ready(function() {
var $container = $('.container');
$container.masonry({
itemSelector: '.my-card',
columnWidth: '.my-card',
transitionDuration: 0
});
});
I am download an 1200px grid css from here: http://1200px.com/
I thought, it is really simple to just create a two column page layout.
So let's say:
<div class="container_15">
<div class="clearfix">
<div class="grid_7">
test
</div>
<div class="grid_7">
test
</div>
</div>
</div>
and it's not good, there are space after second div.
Tried to play with push, etc... no success.
I've downloded the PSD and I saw, there are 15 columns. I am wondering, how can I create a two / three / four columned layout?
Can somebody help me with this?
I've not had direct experience with this grid system but you could always change the settings on the site and download a new version of the css file. 12 columns is a good number as you can easily create the 2, 3 & 4 column layouts.
You are specifying a 15 column grid (.container_15) and then using two columns that only add up to 14 columns.
So of course you are going to have a gap after the second column - a one column gap....
I am trying to make table or grid view in ionic framework.I am able to make that table but It is not looking same what I am required please check my table view in image .
here is my code .Actually I have also header "Invoice#" and "account Name" they should become background gray .Actually I saw if we take two column in row it take 50% 50% width of window .But when there is 3 column column take 33.33 % width But in my case they are not able to take where I am doing wrong Actually I am generating column dynamically Now it is two but may be later five .I need they will take equal space of total width .is this possible to add "+" in last column ?
here is code
<div class="row">
<div ng-repeat="d in data | filter:{checked: true}">
<div class="col">{{d.label}}</div>
<div class="row" ng-repeat="column in displayData">
<div class="col" ng-repeat="field in column.columns" ng-show="d.fieldNameOrPath==field.fieldNameOrPath">{{field.value}}</div>
</div>
</div>
</div>
http://plnkr.co/edit/X0PQov1UA2yEbx8qaOFl?p=preview
Here's a working version of your Plunker. To see the columns added and removed, click the gear icon in the header right.
Plunker
To get your grid to layout properly, you can't nest your repeats. That means you have to slightly change your ng-show to observe the checked values on the data model directly.
In it's most basic form, it would look like this:
<div class="row">
<div class="col" ng-repeat="d in data | filter:{checked: true}">{{d.label}}</div>
</div>
<div class="row" ng-repeat="column in displayData | filter: query">
<div class="col" ng-repeat="field in column.columns" ng-show="data[$index].checked && data[$index].fieldNameOrPath===field.fieldNameOrPath">{{field.value}}</div>
</div>
You'll notice that Ionic automatically handles making the grid full width and when properly laid out, it will automatically evenly space your columns. That's because it uses flexbox. That also allows you to tell specific columns how much space they should use. The remaining columns will naturally even distribute to take up the rest of the space. In the demo, I added a column for the gear and the details buttons and gave them col-10 class. This will force these columns to take up 10% of the screen width. For more on how the grid works in Ionic read the docs here.
I also noted that you seemed to have lots of functions where you're trying to do things like manage how the checked values are updated. Stop doing that. That's the beauty of AngularJS and the ng-model directive. If the property doesn't exist on the scope, Angular just creates it for you, and if it does exist, it just updates it. For example, notice how simply I made your search work by setting the ng-model value and passing that to the filter. I didn't have to create a $scope.query because ngModel does that for me. Similarly, I removed all of the functions and references to the 'checked' values from your controller and everything just works because ngModel automatically adds the checked property to the data model.
I've got a form tool with two lists and a set of tools between them that is laid out in three columns on larger screens like so...
<div class="row">
<div class="col-md-5">
AVAILABLE LIST (1)
</div>
<div class="col-md-2">
MOVEMENT BUTTONS (2)
</div>
<div class="col-md-5">
SELECTED LIST (3)
</div>
</div>
... as you can see, for the xs and sm viewports, the layout should switch to a full width stacked list. What I would like to do is to swap the positions of the MOVEMENT BUTTONS and SELECTED LIST columns on those smaller view ports so that the tools are the last row (1-2-3 => 1-3-2).
The problem I'm having is that when I add classes like col-xs-pull-* col-sm-pull-* to the SELECTED LIST, and col-xs-push-* col-sm-push-* to the MOVEMENT BUTTONS columns, the buttons column dissapears and the selected list is out of alignment. I've tried corresponding col-*-push/pull values of 1 (because anything should swap them when they're full width, shouldn't they?) and 12 (just in case), both have the same unintended result.
How can I apply push/pull modifier classes to the two columns in question to achieve reordered stacking on xs and sm viewports?
One important thing to realize about Twitter Bootstrap is that they take a mobile-first design mindset. This means that classes that apply to extra-small screens will apply all the way up to large screens unless you overload them.
This is also true for the push and pull classes. So what you need to do is layout the buttons the way you intend for them to be in a small screen and then push/pull them in larger screens to where you want them.
In other words, put the buttons in your HTML where you want them in small screens and use the push/pull medium classes to move them in larger screens.
Edit
I've created a Bootply demonstrating the concept of pushing and pulling. See if that makes sense.
The gist of it is this:
<div class="col-md-5">
AVAILABLE LIST (1)
</div>
<div class="col-md-5 col-md-push-2">
SELECTED LIST (3)
</div>
<div class="col-md-2 col-md-pull-5">
MOVEMENT BUTTONS (2)
</div>
A push class moves an element to the right a number of columns and the pull class moves an element to the left a number of columns. For example, if you want to switch two elements, the first of size 3 and the second of size 6, you will need to push the first 6 columns and pull the second 3 columns, effectively switching their positions.
The new Bootstrap three documentation explains the grid behaviour as "Horizontal at all times" for extra small devices. What does this mean? Surely on a small device all columns would be stacked vertically upon one another? What's failing me here is my (lack of) understanding of what a grid is.
I'm coming from a non-designers perspective, and trying to iterate over a number of products into a responsive grid. The number of columns within each row will change dependant on whether an odd or even number of products is being displayed. <-- Bootstrap, and alike seems simple with static content over dynamic pages. For example, must we insert empty <div class="col-xs*"></div> to make it up to 12?
What "Horizontal at all times" means is that there is no breakpoint at which col-xs-* will change from being floated to stacked. For example:
<div class="col-xs-6"></div>
<div class="col-xs-6"></div>
In this example, there will always be two columns of equal size, whether you are on a phone, tablet, or desktop. For contrast:
<div class="col-sm-6"></div>
<div class="col-sm-6"></div>
In this example, the columns will be stacked until the viewport of the device is >=768, at which point it will switch to two columns of equal size.
The question you might be asking yourself is "Why all of these variations?" Well, what these options give us is the ability to customize the layout on various devices without having to get our hands dirty in CSS. For example, if I wanted two equal columns on a phone, but a 75/25 split on tablets and up, I would do the following:
<div class="col-xs-6 col-sm-8"></div>
<div class="col-xs-6 col-sm-4"></div>
If you wanted stacked on phones, equal on tablet, and 75/25 on desktop, then do this:
<div class="col-sm-6 col-md-8"></div>
<div class="col-sm-6 col-md-4"></div>
Because you are not explicitly specifying a grid for the phone, it is going to revert to stacked.
To get a solid feel, throw some simple grids together, and then start resizing your browser. You should be able to see how it changes much more easily than in the docs themselves.
EDIT
Thought of one other example that might be of interest: two equal columns at both phone and tablet, then 75/25 and desktop. The code:
<div class="col-xs-6 col-md-8"></div>
<div class="col-xs-6 col-md-4"></div>
This is actually a great illustration of "Horizontal at all times." Because we are not specifying a col-sm, col-xs continues to be enforced until we hit the desktop breakpoint, which is set at >=992.