We're using Drupal 7 with a custom theme built off of Omega5 and the views module. We have two views assigned to the Content section of a page, and I was wondering if it was possible to assign a CSS style to the entire view (grid-6, for example) in order to get them side by side instead of stacked on top of each other.

I realize that I could circumvent this by using the postscript sections for the views, but I need them in the Content section for this specific purpose.

I went to the Edit View page and changed the "CSS Class" setting under "Advanced," but that applied the CSS to the content within the view/block, and not the entire view/block itself.

Hopefully this question makes sense.

This is what setting the CSS Class to grid-6 looks like: http://i.imgur.com/UdltdKG.jpg
And this is how I would like it to function: http://i.imgur.com/DbsibRV.jpg

Idealy I'm trying to get 2-3 view blocks side by side that work with a fluid layout. Using the postscript sections are a last resort option.

Comments

nevets’s picture

Using css you could give the blocks a width and either add "display: inline-block" or "float: left" to the outer div for the block.

nvanwinkle’s picture

But is there a way to apply a CSS class to the outer div rather than editing the CSS for all the blocks? I only need this to affect the view blocks on this specific page.

nevets’s picture

You need to apply the css to the blocks since that is what you are targeting. If there is a wrapper div you can target you can apply css the all the blocks in the wrapper with something like

#wrapper .block {
  background: red;
}

#wrapper would need to reflect you html/css.