html - Html 的 anchor 标记 <TD>

标签 html css anchor dreamweaver html-email

我在 html-email 中编码。有一个 <td>使用内联 CSS 代码。我必须做些什么才能在整个 <td> 上附加 anchor 标记.请告诉我该怎么做。我尝试了很多选项,但这些都无效。

<td valign="top"  width="204" class="leftColumnContent" mc:edit="left_column_content" align="center" bgcolor="#dee0e2" style="border-left:6px solid #FFF; border-top:5px solid #FFF;"">
    <div align="center" style=" margin-top:10px;">
        <img src="" width="119" height="199" style="max-width:180px;" mc:label="image" />
    </div>
    <p style=" margin-left:20px; width:80%; font-family:Arial, Helvetica, sans-serif; font-size:14px;"> <strong>Text here </strong><br />
        <br />
        text here</p>
    <div style="width:80%; margin-top:10px; margin-left:20px; margin-bottom:15px;">
        <div align="left" style="float:left;"><strong> read more</strong></div>
        <div align="right">
            <img align="none" height="20" id="headerImage2" mc:allowdesigner="" mc:allowtext="" mc:label="header_image" src=".." style="max-width: 55px; width: 55px; height: 23px;" width="55" /></div>
    </div>
</td>

最佳答案

你不能有 <a ...><td>...</td></a> , 按照 HTML 规则。你可以反过来嵌套它们,<td><a ...>...</a></td> .如果您需要使整个单元格可点击,则需要设置 a 的样式。元素,使其占据整个单元格。这样做的方式取决于上下文,但如果 td元素具有固定尺寸,然后在 a 上设置以下内容里面的元素:

display: block; height: 100%;

关于html - Html 的 anchor 标记 <TD>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18948811/

相关文章:

html - 如何将 anchor 标记放入 anchor 标记内

javascript - 从html字符串中获取img元素

javascript - Mousemove 事件未在页面元素或文档上触发

javascript - TinyMCE 不会在 IE 中调整图像大小

html - CSS 字体大小(响应),相对于设备分辨率?

asp.net-mvc - MVC 和 JQuery UI 选项卡 - 如何锚定到各种操作的选项卡?

html - 使元素粘在它们的父容器上

html - 在输入标签中输入内容后是否会触发任何 CSS 选择器?

html - 如何使屏幕阅读器(例如 VoiceOver)读取图形上不可见的链接标签?

jQuery代码动态添加样式到 anchor 标签