I have a problem that seems somewhat simple but I cant fix it :\. Basically I have 2 views using table view on my front page, latest updated blogs and latest updated wikis. The table widths adjust accordingly to the blog or wiki title, so the blog titles are long and fill up the whole width which looks nice, but the short wiki titles make the table look very short and half the page width. I dont want to use

td.content table{
width: 100%

cause i have other tables in content I dont want to be 100%. I hope anyone can help me! Thanks so much! :D


gurge’s picture

oh! that code I pasted doesnt work for me cause views arent coded in the template files as table is my guess? Any idea how to adjust table widths for views? :)

goufix’s picture

I whish i had the answer too... i have the same problem. Style.css wont take anything formatting for the views tables...

Dinis’s picture

Exactly the same issue here. I have multiple table views displayed on a page and would like to be able to display the columns with a uniform fixed width, not by the length of the content output.

Kerel’s picture

Isn't that possible using template files in Views? You can find that under 'Theme: information'.
I think you then need to make a template file in your Theme folder you are using (E.g.: views-view-field.tpl.php) and there you can adjust your width. (I think if you set width in views-view-field.tpl.php, it will set that width for all fields so you need to use the template files needed) Problem for me is, I seriously lack knowledge on php or CSS so it takes me time to put it in there correctly.
If someone found the correct way, please let us know.

nilashis’s picture

did someone find a solution here to adjust column width for a table created using views module?

thejamesjones’s picture

I have the same problem, I used a view to create a grouped table under the table settings. My table is a listing of names and extentions by department, but they don't line up. I want to apply a column width, but don't know where.

I am experimenting with css injector, will report back if I find anything.

Would appreciate any help.


Ananya MultiTech’s picture

i dont know whether u found your answer or not..
what I did was, I updated style.css file in themes/
/css folder. I just added simple classes like :
.distri_column1 {width:15%;}
.distri_column2 {width:35%;}
.distri_column3 {width:25%;}
.distri_column4 {width:25%;}

And then configure each field/column in Views>Configure Field>Style Settings>Customize Field HTML = NONE and Create a CSS class>distri_column1 and refrsh your View. I know this is not 100% professional but quick approach...

SharonD214’s picture

Just what I was looking for :)

newswatch’s picture

I had to set HTML=DIV for all the three sections.

Only then it worked.

But it worked, nonetheless.


Subir Ghosh