Hi,
Basically I am trying to create an image gallery where each image has a description and a link under it.
Each image, with its description and link, is a product in my Model.Products.
I tried to include each product into a list item of an orderede list and using pure CSS to style it.
The problem is that the floats and margins don't allow to obtain what I need ... It's not easy on cross browser.
So I am thinking in creating a helper that creates a table on the fly.
So I would return 24 products to my view.
Then on my helper I would make rows = Model.Procucts.Count() / 4 and I would get 6 rows.
Then with a loop I would generate each row with its columns for each product.
On a multiple of 4 I will increase the row number and create a new row.
I have paging so the last page might have only, for example, 23 records.
So on my html helper I would have rows = Round Up (Model.Procucts.Count() / 4)
And then I would have a last column empty ...
This would not be a problem with list but with tables I can't have a row with less columns than another ...
... well I can but in this case would get a wider column which is not the objective.
What do you think?
I am just starting to create the helper.