0
我有一個非常簡單的佈局爲我的應用程序。標題,主要內容和頁腳。語義上講,它們呈現:
<body>
<div id = "header"> </div>
<div id = "content"> </div>
<div id = "footer"> </div>
</body>
相應的CSS是非常基本的,以及:
#header{
width:100%;
min-height:10%;
}
#center{
width:100%;
min-height:80%;
}
#footer{
width:100%;
min-height:10%:
}
正如你所知道的頁面佈局,這裏是內容的顯示方式:
<div id= "content">
<?php echo $sf_content; ?>
</div>
以上所有內容都非常精細,它本身就像它應該呈現的那樣。但有一個小故障與此,我投入<?php echo $sf_content; ?>
的那一刻,頁腳被包含作爲內容的一部分,而不是作爲#content標記之後的div。
從本質上講,我得到這個:
<div id = "header"></div>
<div id = "content>
<div id ="symfony_template_to_be_rendered">
<!-- all web application related content like forms etc. -->
</div>
<div id = "footer">Footer material
</div>
</div>
正如你可以看到,一些奇怪的原因,頁腳symfony的內容一起向上移動。很明顯,這是一個小故障,因爲如果我從佈局中的div標籤中刪除php hash $ sf_content部分,那麼頁腳會將自身渲染爲應該在的位置,並且所有內容都會佔用所需的尺寸。
這是怎麼回事?
你能發佈代碼ebete包含頁腳? – ilSavo
實際上,我應該關閉它,這是一個非常微不足道的問題,我沒有關閉標籤在我的一個html頁面,這是什麼搞砸了:) –