Nothing from this not working. When I typing large text table going deep right and horizontal nav appears.
index.haml
%table{:border => 1, :width => "100%"}
%tr
%th{:width => "200"} Name
%th.edit Edit
- @wallpapers.each do |wallpaper|
%tr
%td.name= wallpaper.name
%td= link_to (image_tag wallpaper.thumb.url(:thumb)), edit_wallpaper_path(wallpaper)
%td= button_to 'Delete', wallpaper_path(wallpaper), :confirm => 'Are you sure you want to delete this wallpaper?', :method => :delete
style.css
th.edit {width:20%;}
td.name {width:20%;}
You really want to set the style, not html attributes
Try this:
What you’re actually creating is:
And you should be creating:
of course, using classes and CSS would be better, but this will solve immediate concern.