I have used the Views module to create a block which lists three latest thumbnails of my latest artwork. I would like to display those thumbnails horizontal. Problem I have is that the ID the divs have are unique. Is there a way to make sure the first div is called .left, the next .center and the last .right instead of #views-node-5, #views-node-6, #views-node-7? Since the nodes that are displayed will change, it makes no sense in styling #views-node-5 etc.

So I guess I have to code me a view (http://drupal.org/node/42597) with an array containing .left, .center, .right in it and let views cycle through that while it outputs the thumbnails. Anyone ever made anything simular? This is not a coder speaking :)

Comments

maastrix’s picture

*bump*

maastrix’s picture

Really nobody? Does anyone ever you custom views styling?

platform8-1’s picture

You should be able to float them without specifying three separate classes like that.

There should be a container div for the block. For example, I have a view called LatestReviews, so my list has a container with an id of #block-views-LatestReviews

To line em up horizontally, I would just add this to my css file:

#block-views-LatestReviews li {
width: 33%;
float: left;
}