在锚标记中嵌入<p>标记将不允许我触发href </p>

时间:2015-03-30 02:26:06

标签: html css button tags click

我正在尝试使用<a>标签创建菜单。我在<a>标记内添加了一个span,以便对其进行样式化。

<dt onClick = "changeColor_one()">
    <a class="accordionTitle" href="#" id = "first_acor" 
       style="background-color: #00ADF7">
       <p style="display:inline;" id="smaller_text">Are there any minimum time requirements to join?</p>
    </a>
</dt>

点击dt中不是实际文本本身的任何部分将触发内容。知道点击文字为什么什么都没有?这是#smaller_text

的样式
#smaller_text
{
    position: relative;
    top:-20px;
    font-size:22px;
    float:left;
    font-family: 'Open Sans',sans-serif;
}

0 个答案:

没有答案