2011-09-01 62 views

回答

1

這種固定在FF的問題應該做的伎倆在IE以及:

#Container { 
    background-color: red; 
    clear: both; /* NOTICE THE ADDITION OF CLEAR */ 
    font-family: Courier; 
    margin-left: 10px; 
    margin-top: 2px; 
    opacity: 0.7; 
    text-align: left; 
    width: 80%; 
} 
2

這是因爲你的標題是浮動的左側和#container不是。在您的#container風格中使用clear:both

此外,一些建議,因爲你的HTML看起來很差:不要使用<font>。改爲使用divs/span + style。您的<link>標籤應位於<head>標籤內。在你的情況下,該特定的<font>標籤應該替換爲<h1>,因爲它是該網站的標題。你可以使用這樣的事情:

<div id="container"> 
    <div id="header"> 
     <h1>Gaming-House</h1> 
    </div> 
    <div id="content"> 
     <p>Hi</p> 
     <!-- stuff --> 
    </div> 
</div>