标签: html drupal hyperlink
I have a <a> link with items inside. When I put a <p> tag around it, to simulate drupal's line break and paragraph filters that will be applied to my code automatically, The link becomes two links. One link is inside the <p> with no children the other is outside with one of the child elements. Why is this happening and how can I prevent it?
<a>
<p>
<div class="notDrupal srvTileGroup"> <p> <a href="http://www.airforcemedicine.af.mil/" class="notDrupal srvTile shadow2 shadow6h"> <div class="notDrupal srvTileTxt bAirforce"><!-- <p class="notDrupal">AIR FORCE</p> --></div> <img class="notDrupal srvTilePic" src="https://openclipart.org/image/2400px/svg_to_png/256723/BackgroundPattern126Colour.png" alt="air force"></img> </a> </p> </div>
Codepen
答案 0 :(得分:1)
这个问题与Drupal无关。您已在锚点中放置了div元素。用span替换该div,你可以看到你的代码开始完美。
有关信息,请参阅Fiddle