【发布时间】:2017-01-14 14:14:39
【问题描述】:
在我的 rails 应用程序中,我有一个带有 div 的视图。 div 有一堆内容,包括链接。我想让整个 div 都可以点击。
在我的 view.html.erb 文件中,它看起来像这样:
<a href="/google">
<div class="container">
content with other anchor tags
</div>
</a>
但它呈现如下:
<a href="/google"></a>
<div class="container">
<a href="/google"></a>
content with other anchor tags
</div>
有什么想法吗?
【问题讨论】:
标签: html css ruby-on-rails