2017-02-16 8 views
0

私は.main背景といくつかの問題があります。私は背景の幅を取得しようとしているが、私はできません。私はこれについていくつかの同様の質問を見てきましたが、問題を解決できませんでした。ここに私のコードです。ここに私のフォントがありますので、あなたは私のポイントをより良く見ることができます。 Fontsメインcontect背景全幅

<!DOCYPE html> 
 
<html> 
 
\t <head> 
 
\t \t <title>MaxSkins-Home</title> 
 
\t \t 
 
<style type="text/css"> 
 
\t \t 
 
\t \t body { 
 
\t \t \t background-color: white;  
 
\t \t \t background-attachment: fixed;    
 
\t \t \t margin: 0; 
 
\t \t \t padding: 0; 
 
\t \t \t width: 100%; 
 
\t \t \t height: auto; 
 
\t \t \t min-width: 1000px; 
 
\t \t } 
 

 
\t \t @font-face { 
 
\t \t \t font-family: "Jocker"; 
 
\t \t \t src: url("JockeyOne-Regular.ttf") format("truetype"); 
 
\t \t } 
 

 
\t \t @font-face { 
 
\t \t \t font-family: "Pacifica"; 
 
\t \t \t src: url("PacificaCondensed-Regular.ttf") format("truetype"); 
 
\t \t } 
 

 
\t \t @font-face { 
 
\t \t \t font-family: "ReklameScript"; 
 
\t \t \t src:url("ReklameScript.ttf") format("truetype"); 
 
\t \t } 
 

 
\t \t h1 { 
 
\t \t \t font-size: 120px; 
 
\t \t \t text-align: left; 
 
\t \t \t font-family: "Jocker"; 
 
\t \t \t margin-left: 45; 
 
\t \t \t color: rgb(200,101, 103); 
 
\t \t } \t \t 
 

 
\t \t h2 { 
 
\t \t \t font-size: 70; 
 
\t \t \t margin-left: 224; 
 
\t \t \t font-family: "Jocker"; 
 
\t \t \t color: rgb(200,101, 103); 
 
\t \t } 
 

 
\t \t #header { 
 
\t \t \t width: 100%; 
 
\t \t \t height: 50px; 
 
\t \t \t margin: auto; 
 
\t 
 
\t \t } 
 
\t \t 
 
\t \t #navigacija { 
 
\t \t \t width: 100%; 
 
\t \t \t margin-left: 0px; 
 
\t \t \t padding: 0px; 
 
\t \t \t height: 50px; 
 
\t \t \t overflow: hidden; 
 
\t \t \t text-align: right; 
 
\t \t \t position: fixed; 
 
\t \t \t background-color: #089DE3; 
 
\t \t \t z-index: 9999; \t \t \t 
 
\t \t } 
 
\t \t 
 
\t \t #navigacija a { 
 
\t \t \t color: white; 
 
\t \t \t text-decoration: none; 
 
\t \t \t line-height: 50px; 
 
\t \t \t font-size: 30px; 
 
\t \t \t font-family: "Pacifica"; 
 
\t \t \t display: inline-block; 
 
\t \t \t padding-left: 50px; 
 
\t \t \t padding-right: 50px; 
 
\t \t \t padding-top: 0px; 
 
\t \t \t padding-bottom: 0px; 
 
\t \t } 
 
\t 
 
\t \t #navigacija a:hover { 
 
\t \t \t background: #00C5CD; 
 
\t \t } 
 
\t \t 
 
\t \t .main1 { 
 
\t \t \t margin-top: 50px; 
 
\t \t \t font-family: "ReklameScript"; 
 
\t \t \t font-size: 50; 
 
\t \t \t background: #089DE3; 
 
\t \t \t text-align: left; 
 
\t \t \t margin-left: 194; 
 
\t \t } 
 
\t \t 
 
\t \t .video-container { 
 
\t \t \t position: relative; 
 
\t \t \t padding-bottom: 56.25%; 
 
\t \t \t padding-top: 0px; 
 
\t \t \t height: 0; 
 
\t \t \t overflow: hidden; 
 
\t \t \t bottom: 930; 
 
\t \t \t right: 0px; 
 
\t \t } 
 
\t \t .video-container iframe, 
 
\t \t .video-container object, 
 
\t \t .video-container embed { 
 
\t \t \t position: absolute; 
 
\t \t \t top: 0; 
 
\t \t \t left: 0; 
 
\t \t \t width: 100%; 
 
\t \t \t height: 100%; 
 
\t \t } 
 
\t \t .video-wrapper { 
 
\t \t \t width: 640px; 
 
\t \t \t float: right; 
 
\t \t \t margin-left:auto; 
 
\t \t \t margin-right:auto; 
 
\t \t \t max-width: 100%; 
 
\t \t } 
 
</style> \t \t 
 
\t \t 
 

 
\t \t </head> 
 

 
<body> 
 
\t <div id="header"> 
 
\t <div id="navigacija"> 
 
     \t \t <a href="Home.html"><b>HOME</b></a> 
 
     \t \t <a href="Shop.html"><b>SHOP</b></a> 
 
     \t \t <a href="#"><b>GET POINTS</b></a> 
 
     \t \t <a href="#"><b>INFO</b></a> 
 
     
 
    \t </div> 
 
\t </div> 
 

 

 
\t \t <h1><b>EARN POINTS,<br> GET SKINS!</b></h1> 
 
\t \t <h2><b>How does it work?</b></h2> 
 
\t <div class="main1"> 
 
\t \t <p><b>It's simple!<br> Watch videos, do tasks and have fun!<br>After earning large amount of coins,<br> contact us to get your skins!<b></p> 
 
\t 
 
\t </div> 
 

 
\t <div class="video-wrapper"> 
 
\t <div class="video-container"> 
 
\t \t <iframe width="640" height="360" src="https://www.youtube.com/embed/lwItL2NXwDw" frameborder="5" allowfullscreen></iframe> 
 
\t </div> 
 
\t <!-- /video --> 
 
</div> 
 
<!-- /video-wrapper --> \t 
 
</body> 
 
</html>

+1

試し 'ボディ{マージン:0; } ' –

+0

@MichaelCokerすでにこれを行っています。 –

+0

"私は背景の幅を広げようとしていますが、できません。"これはどういう意味ですか、何が間違っていますか? – Johannes

答えて

0

あなたの問題は、いくつかの無効なCSSだったようです。あなたのCSSで<style></style>タグを持っていたが、CSSはあなたのマークアップ(HTML)の内部にあるときにのみ必要とされています。

私はあなたのCSSからHTMLタグを除去し、 - 少なくとも私にとっては - .main1は現在、全幅バックグラウンドを持っています。 私はそれがあなたの問題だったと仮定しています..?

+0

ええ、私のCSSはHTMLです。私はcssファイルを分離して作成し、何が起こるかを試してみるつもりです。 –

関連する問題