Bootstrap typescript angularjs change lines - css

I have four photos in one row. When the row is complete, I pass to another row and when it is full I pass to a third row, but this is incomplete. How can I tell to angular it is time to change line or the row is imcompelete and to close the row? I am using the grid of bootstrap3.

Does it need to be done programmatically? I would just put them all in one row, and handle the items per row issue in CSS with width percentages (25%) with float left

Related

React DataGrid Single Row Customization

Working with a Material UI react data grid for the first time and I need to apply a custom background color to only the first 3 rows, each being a different color. The custom coloring of these rows is static, nothing that's supposed to happen after an event takes place. Is there any way to point to only one row and apply a background color to it from my scss file?
On a slightly related note, how do I extend column separators so they fill the data grid?
Thank you in advance!
use nth-child(1){}
for style the number 1 child.

How to wrap and stack items in QML, into rows and columns

I have a series of buttons that I want to appear in columns at the bottom of my QML page. The number of columns across should depend on the width of the window, as the window width increases I want more columns to be added. (And fewer rows as a result as components are pulled up to the previous line)
This is sort of like a Flow component, but I want the items to appear in columns, evenly spaced across the page, in rows and columns (columns centered vertically, at the bottom of the page). Sort of like GridLayout.
I can't figure out what QML component(s) to use to achieve this.
I think what you're looking for is a GridView. See the layout documentation.
I'm not positive, but based on your description I think you would just need to set the flow property to GridView.FlowTopToBottom.

What is a way of creating a reactive grid with dynamic rows

So basically, I have a react app and I am trying to create a grid of square elements but:
i dont want to
shrink them below a certain size (meaning that when the page
shrinks, the last elements on a row are pushed to the next row
etc.).
I was also hoping to put in a few special 2x2 elements in the grid (realistically not
many, between 1-3)
I am looking to be able input a series of objects (ordered by priority) and have the page dynamically allocate them into the grid space as best it can.
I have done bootstrap grids in the past, 1. could be achieved fairly easily by changing the .col-x value at certain screen widths so the elements wrap
But 2. seems really hard:
making a static row with a 2x2 element and some 1x1 elements seems
easy, but then it will all break when the above row tries to wrap, or
when i have to wrap elements in this static row.
I was also thinking of offsetting 2 consecutive rows and just placing a div with the 2x2 boxes over the offset, but then i would have to change the row elements that are being offset on the fly, and i dont know how to get an element to tell me what row and column it is in.
Any ideas?

CSS selector to target rows in grid

I have been working on an expandable card that has a dynamic number of rows and columns depending on the content length and width of the container. I want the card to first be in collapsed view where only the first row is displayed and expand to show the full card when the user toggles the card. I am wondering if there is an option to hide all rows except the first one using CSS based on conditional class added on button toggle if not what would be the ideal solution to handle this using javascript? bear in mind the number of columns in a row will change based on screen size.
sample code sandbox

Dynamic CSS for 2 columns

Is there a way to create a dynamic CSS for 2 columns? What I mean is, there are 2 columns in my webpage, the left and right column. It is similar to Facebook, where the profile picture is the left column and the right column is where your feeds are located. When a link is selected from the left column, without refreshing the page, the right column will display the page automatically. The left column is where my links are located and it is fixed. The only change factor is my right column. How can I create and apply the CSS?
You don't need a CSS template in order to use columns. All you need to do is set your column widths to percentages instead of pixels. If you're using a three column grid, with one div taking one column and the other spanning two, then the percentage for the first column would be 33.3333333% (don't bother rounding up, the browser will take care of it) and the second div would be 66.6666666%.
Also, in order for your second div to refresh without loading another page, you'll have to use Ajax.
There are css3 columns but they are not supported by IE. What a surprise!
It sounds more like you just need a css layout framework. Search for css frameworks / templates.
I of course recommend simpl.css.
The page is ugly at the moment but will be updated soon.

Resources