I have a view which displays records in rows in a table, is there a way to keep all the rows the same height? Depending on what text is in the fields, some rows are a different size to others and it looks horrible. Basically all rows should be the same height as the largest one required to contain the text. I'm suprised this doesnt happen automatically.

Thanks.

Comments

Problue Solutions’s picture

surely lots of people encounter this and arent happy with how it looks??

Problue Solutions’s picture

Stomper’s picture

I would like to know how to, too.

Currently, I have set one of the fields in my View table to teaser, but since the original document has differing line spacing, and teaser length is based on character count and not lines, the table looks horrible. I was trying to make the row height uniform, but it didn't work.

Since the lowest teaser character number possible is 200, if line spacing is not the same, the teaser looks bad as it includes white space.

I'd like to specify, and fix the row height. Is this a module job or CSS?

Also, on a somewhat similar note, how can I change the spacing between columns in a views table?

zeppfan’s picture

I can see this question was asked some time ago. I did this, hope it's of help to someone.

In css:

table{
width:100%;
}

dalvarezkeller’s picture

I´m having the exact same problem with the display of teasers in views and panels: the height is variable and thus the result hum-not nice at all, especially when displaying horizontally. I guess the solution would be to set the view-body-field not per number of words but number of lines...is this possible through the view config?

Thanks for your help!

cfox612’s picture

Views just fills in the content, it doesn't style things :)

You'll manually have to find the height of the largest item and add the overriding style to your theme's style.css file. Of course if you're adding new content all the time this would be a pain, so for that instance then I'd recommend using the "min-height" property to at least get them closer (larger would still be able to take up more room as needed and not be cut off).

You can also trim the words at a specific number of characters, but that isn't always possible.

dalvarezkeller’s picture

Hm...

I thought that since views offers the possibility of setting the fields -eg. trimming content per number of characters-, it could also trim it per number of lines :( Somehow, trimming per number of characters is just not accurate.

Thank you for the advice! I´ll try to set it manually.