Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By gurge on
Hello!
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
Comments
oh! that code I pasted
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? :)
i wish i could know too
I whish i had the answer too... i have the same problem. Style.css wont take anything formatting for the views tables...
Exactly the same issue here.
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.
Isn't that possible using
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.
did someone find a solution
did someone find a solution here to adjust column width for a table created using views module?
Same Problem
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.
James
simple one..
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...
Thanks!
Just what I was looking for :)
Table column With (Solution)
Here is the solution - http://drupal.stackexchange.com/questions/39195/add-class-to-column-in-a...
I had to set HTML=DIV for all
I had to set HTML=DIV for all the three sections.
Only then it worked.
But it worked, nonetheless.
Thanks.
-----------------------------
Subir Ghosh
www.subirghosh.in