Fluid arrangment of dynamic tables - html

I had a question with regards to fluid arrangement of tables. I have attached a screen-shot below to try and explain what I am trying to achieve.
Basically, I have a number of dynamically created tables. Their widths are fixed but their heights can vary. What I am trying to achieve is, the maximum utilization of space when the browser window is re-sized (in terms of organization of the tables).
I have tried the following:
1. Arrange the tables in descending order of the number of rows they have.
2. Using a style of 'float: left;' on the table (or a div surrounding the table).
However, as you can see below, there is a gap below on the first column that could have been utilized by table 4 (the last one below), but it hasn't because table 3 (column 2, row 2) is taking up some space which prevents table 4 from being placed above.
I hope I've described it in a manner that could be understood, if not please let me know how I could clarify any points so that you could help me out.
Basically trying to get a fluid design with the maximum space utilization. Any ideas on how I could achieve this?
Thanks in advance.
Example http://img717.imageshack.us/img717/5492/exampleqm.jpg

Can't be done without javascript (or a whole lot of assumptions and restrictions).
Try the Columnizer jQuery Plugin.

Try the jQuery Masonry plug-in.

Related

Nesting columns and rows with Bootstrap for many-input section

I have five columns I want on the same row. Within each of these boxes there are numerous form inputs some of which need to be on the same line or otherwise organized as well.
I have been attempting to mix it together using Bootstrap's grid system but nothing I seem to do is working as intended. I thought I could just throw everything into a container, and then use nested rows and columns to achieve the desired effect.
For attached Bootply, the Firstname, Middle Initial, Last name, and Nickname are a great example of what I'm going for. I want the "Name & Address" section to be one column, and within that I want all of the information to be on 3 rows
http://www.bootply.com/HhszskhttD
Is Bootstrap grid layout the best way to approach? Do I just need to mess with the sizing of my inputs? I have also tried mixing in form-group-sm but that did seem to go in the right direction. I suspect where I'm using form-group in relation to the rows and columns is the root of my issue.
What's the best way I can perform this type of layout?
Bootstrap is perfect for this! I love (LOVE) the Bootstrap Grid System.
To do what you would like to do it is very simple. For the first row put class="row". After that it is all easy stuff. Nesting is just how it seems, but I will explain a little bit:
Lets say I have the following columns: col-xs-4, col-xs-4, col-xs-4. Now in one of those columns I want to separate boxs, I would add the following: col-xs-6, col-xs-6. You just have to remember, if you are nesting rows, they add up too 12 always. So when I am adding two 50% squares to the col-xs-4 it would be col-xs-6 and NOT col-xs-2 (col-xs-2 would be 16.66%).
So nesting is very simple, and it is not as tough as it seems.
EDIT
Let me throw an example out for you! :)
http://www.bootply.com/4yFHVS5g9r
The Bootply above shows how simple nesting is.
EDIT 2
Another example:
http://www.bootply.com/nJQEzSzsU7
Also, each nested column has 15px margin.

Creating a table-like grid without using table

Please see my awesome graphic below which is neither too scale or complete. BUT, I wanted to show the structure I'm going for instead of describing it.
I am creating a space rental system wherein a calendar, structured similarly to the below image, both shows the "taken" spots and also allows a user to click an "open" slot to reserve it themselves. I don't need help with the functionality though, just the layout.
Since this is tabular data at it's finest, with headers and everything, I was able to easily create the desired layout that way. However, tables render from left to right, so in the example below, it renders SPACE 1 9:00am, SPACE 2 9:00am, SPACE 3 9:00am, etc. I need it to actually render SPACE 1 9:00am, SPACE 1 10:00am, etc.
The reason is that in order to make each reservation into a "block" represented by the blue squares below, I need to be able to loop through the columns vertically and not through the rows horizontally.
I also want the columns to be a consistent width and be flexible if more spaces are added or if one/some are removed down the road.
I've been playing with flexbox, which I've barely used before, and I'm having no luck at all. I'm not even sure that's the right direction.
My question would be either 1) is there a way to get a standard table to load the way I want or 2) how can I do this without tables?
Maybe bootstrap's grid system will fit your needs. http://getbootstrap.com/css/
You can create a grid like structure by adding columns, up to 12 in a row, and locking those into rows.

How to make multiple left columns fixed and scroll the the rest columns in HTML table?

I am having trouble of freezing multiple columns or column-group and making the rest columns scrollable.
I tried the solution like
how do I create an HTML table with fixed/frozen left column and scrollable body?
but it only works for one column. If I try to freeze multiple columns, they overlapped each other.
I also do not want to use multiple tables which will be difficult for dynamic data binding.
Does anyone know a simple solution for this case only using CSS?
There is one jQuery Plugin "DataTable". This will help you to freeze any number of columns in your table.
Check the tutorials here.
http://www.datatables.net/extensions/fixedcolumns/
http://www.datatables.net/release-datatables/extensions/FixedColumns/examples/two_columns.html
Hope this solves your problem.

How do I make a table like this?

http://weknowwhatyouredoing.com/
I'm trying to make a table like this one where I have a profile image to the left, a bold title/name and text underneath the bold title/name, and date/time stamp underneath that... basically the same views as on that website (http://weknowwhatyouredoing.com/) or better (or twitter tweets).
Anybody know of any tutorials on how accomplish this? I'm currently using table with multiple columns but it seems that when one cell is big, all the cells in that row become the same height and i don't like that. In android this is called a list view but i'm not sure what it is in the html/css world, any help please? Thanks in advance
You could make multiple tables floating next to each other. The elements on the website you show aren't aligned as fa as I can tell.
A tutorial on rowspan and colspan can be found here.
If you make the image span 3 rows, you can put the bold text, content and date stamp each into one row. With valign you can vertically position elements within a row if the row becomes higher than the content. This will probably happen if the 3 rows together are higher than the one spanning row containing the image.
As a quick fix for your issue with the equal row heights, you could use the same layout method as they use on weknowwhatyouredoing.com.
Wrap each column in a separate <div>, and then place your <table> inside.
4 containers, 4 tables with independent row heights.
You shall give a look at the Twitter Bootstrap CSS library Twitter Bootstrap
It's pure HTML5/CSS using only divs.
for improve your knowleges in HTML, you can see W3C (Word Wibe Web Consortium) specs. For sample, if you see this page, W3C explain all structure, attributes, for Table element.
You can find lot of tutorial in google ( search "tutorial create Table HTML" ).
Also, you can help you to understand website structure with browser plugins that display hover element in specific website. ( firebug for Firefox and Chrome, Dragonfly for Opera browser...)
Why not use multiple list elements? Tables definitely don't give you flexibility for responsive designs. Making multiple columns of list elements can be rearranged as needed with limited restrictions

Expand width of final cell in a div table?

I'm working on constructing a table using only divs. I began creating the table using percentages to set column widths, but would prefer to just use table-cell and not have to worry about things that way. Only problem is I'm not guaranteed to have the same number of elements in every row.
http://jsfiddle.net/JWvLX/
This example shows what is currently happening in the top two rows, and what I want to happen if a cell is removed/not present in the bottom two rows.
What exactly do I need to do to accomplish this? Is this possible using only divs for tables or will I be forced to use actual tables to get the desired effect.
There's no equivalent for colspan/rowspan in CSS tables, but this Sitepoint post has some trickery you might be able to use.