I have wracked my brain and can not find the reason this is happening. I have some links in one div that are mailto which work fine. But P tags and an image in a div in the next column seem to be inheriting the mailto.
I am using bootstrap. Has anyone come across this before? Can anyone see something I am missing?
Top of container with affected code:
<div class="row rowSettings col-sm-12">
<div class="col-sm-3 text-left sidepanel">
Some divs, then this div with the mailto links:
<li class="leftSubNavLinks"><a class="sublinks" href="mailto:email@domain.com?subject=message subject&body=prepopulated message" target="_blank"Contact</li>
and the following div that is inheriting the mailto:
<div class="col-sm-9 text-left">
<div class="col-sm-8 titleContainer">
<img src="url/image.svg" alt="">
</div>
<div class="col-sm-4 titleContainer">
<h1 class="mainTitle"> Title text</h1>
</div>
</div>
<div class="col-sm-9 clearfix">
<p class="bodyCopy" id="body-text">some text here</p>
</div>
答案 0 :(得分:1)
您尚未关闭<a>
<li class="leftSubNavLinks">
<a class="sublinks" href="mailto:email@domain.com?subject=message subject&body=prepopulated message" target="_blank">Contact</a>
</li>
答案 1 :(得分:0)
您尚未关闭<a>
代码
<li class="leftSubNavLinks">
<a class="sublinks" href="mailto:email@domain.com?subject=message subject&body=prepopulated message" target="_blank"Contact
</li>
应该是:
<li class="leftSubNavLinks">
<a class="sublinks" href="mailto:email@domain.com?subject=message subject&body=prepopulated message" target="_blank">Contact</a>
</li>
浏览器会尝试通过关闭它认为应该关闭的标记来“修复”损坏的代码。这几乎肯定不是应该关闭的地方,这就是将以下HTML捆绑到<a>
中的原因。