Div元素不能嵌套在元素标签内

时间:2017-11-15 08:34:12

标签: html

我在谷歌搜索了这条消息:

元素div不能嵌套在label元素中。但我找不到任何东西。

这是我的HTML:

 <div class="email-logo">
     <label>
         <div class="email-logo-image">
              <img src='/Beheer/Document/Download?documentID=@(Html.GebruikerContext().Klant.LogoID)' />
         </div>
         <div class="email-logo-button">
              @Html.RadioButton("logo-selectie", "klant", Model.GebruikKlantLogo, new { @name = "logoKeuze" })
              <span>eigen logo</span>
        </div>
     </label>
 </div>

所以我的问题是:

如何解决这个问题?

谢谢

1 个答案:

答案 0 :(得分:1)

如果你不尝试这个,不知道为什么你需要div。

<div class="email-logo">
 <label>
     <img src='/Beheer/Document/Download?documentID=@(Html.GebruikerContext().Klant.LogoID)'class="email-logo-image" />
     <span class="email-logo-button">
          @Html.RadioButton("logo-selectie", "klant", Model.GebruikKlantLogo, new { @name = "logoKeuze" })
          <span>eigen logo</span>
    </span>
 </label>
<\div>

你也有一个错字很可能会导致你的HTML错误。 (否&gt;关闭标签)

相关问题