Rails haml,table,如何设置td最小宽度?
我正在尝试使用表格来布局表单。我使用rails和haml。 我有下面的代码,但我无法让 min_width 工作 - 文本“min_width”等实际上显示在页面中。
%table
%tr
%td min_width => "100px;"
='aaa'
%td.field
= f.input :last_name, :label => ' '
I am trying to layout out a form using a table. I use rails and haml.
I have the code below but I can't get the min_width to work - the text "min_width", etc. actually show up in the page.
%table
%tr
%td min_width => "100px;"
='aaa'
%td.field
= f.input :last_name, :label => ' '
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将行更改
为
Change the line
to
我意识到这有点老了。 @matt 的回答让我走上了正轨,但我最终不得不使用:
I realize this is kind of old. @matt's answer put me on the right track, but I ended up having to use: