dpbtbcz6650 2017-09-06 09:17
浏览 73
已采纳

Php将<h5>标签置于错误的方式

I have this code, that generates the menu from sql.

<footer class="footer-basic-centered">
  <p class="footer-links">
    <?php 
    $top_menuDown = mysqli_query($kapcs, "SELECT * FROM top_menu WHERE latszik = 1 AND (top_menu_place = 1 OR top_menu_place = 0) ORDER BY top_menu_sorrend ASC");
    if(mysqli_num_rows($top_menuDown) > 0 )
    {
        while($top_nav = mysqli_fetch_assoc($top_menuDown))
        {
            echo '<a class="footer_menu_to_link" href="'.$host.'/'.$top_nav['top_menu_seo'].'" title="'.$top_nav['top_menu_nev'].'"><h5 class="kat_h5">'.$top_nav['top_menu_nev'].'</h5></a>'."
";
        }
    }
    ?>
  </p>
  <h6 class="copy"><p class="footer-company-name"><?php echo date("Y"); ?> <?php echo $siteName; ?> &copy;  - Minden jog fentartva!</p></h6>
</footer>

As you can see it on the image i uploaded, at the first link, the <h5> tag is outside the <a>. The other links are okay.

Whats going on there?

enter image description here

  • 写回答

1条回答 默认 最新

  • doupu0619 2017-09-06 09:30
    关注

    You are putting a h5 in an a that is in a p. That is not going to do what you think.

    The p will get closed automatically when you add a new block-level element like a h5.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)