2012-04-17 23 views
1

我不太確定爲什麼會出現這個問題,或者如果它真的甚至是一個問題。有任何想法嗎? 第33行,第10列:元素邊欄不允許作爲此上下文中元素主體的子元素。「在這種情況下元素邊欄不允許作爲元素體的子元素。」

<body> 
<header> 
    <a id="logo" href="#"><img src="img/logo.png"></a> 
    <nav> 
     <ul> 
      <li><a href="#">BLOG</a></li> 
      <li><a href="#">WORK</a></li> 
      <li><a href="#">ABOUT</a></li> 
      <li><a href="#">CONTACT</a></li> 
     </ul> 
    </nav> 
</header> 

<div id="container"> 
    <div id="headline"> 
     <h1>Headline</h1> 
    </div><!-- end headline --> 
    <div id="postinfo"> 
     <p>by me<br />15 April 2012</p> 
    </div><!-- end postinfo --> 
    <div id="postentry"> 
     One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. "What's happened to me? " he thought. It wasn't a dream. 
    </div><!-- end postentry --> 
</div><!-- end container --> 

<sidebar> 
+0

你的DOCTYPE是什麼? – sbeliv01 2012-04-17 15:10:48

+0

對不起,這很重要.. <!DOCTYPE HTML> – AMC 2012-04-17 15:37:23

回答

1

毫無元素<sidebar>在HTML5 - 它是從早期的草案數年前下降。考慮使用<aside>來代替。

+0

奇怪的是,在我對HTML5所做的所有閱讀中,甚至在相對較新的文檔中都提到了無數次。我會切換到一邊,看看那是怎麼回事。謝謝。 – AMC 2012-04-18 01:39:11

相關問題