2012-05-10 13 views
1

私はCodeAcademyから独自のレ​​ジュームプロジェクトをビルドすることを再現しようとしていますが、ヘッダーのスタイリングに問題があります。何らかの理由で、h1タグとh2タグの周りに私の望む背景色を置くだけですが、dlタグの周りには置かないでしょう。また、私が組み込んだtwitterブートストラップリンクは私のページでは動作しません。どちらの問題についても助けてください。ここでTwitterのブートストラップとCSSのヘッダークラ​​スのフォーマット

は私のHTMLです:

<!DOCTYPE html> 
<html> 
    <head> 
    <title> 
     Parker Preyer's Resume 
    </title> 
    <link rel="stylesheet"href="style.css" /> 
    <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" /> 
    </head> 
    <body> 
    <div class="header"> 
      <h1> 
          Parker J. Preyer 
         </h1> 
      <h2> 
          "I'm learning how to design websites!" 
         </h2> 

      <dl> 
      <dt> 
          Email 
         </dt> 
      <dd> 
          [email protected] 
         </dd> 

      <dt> 
          Phone 
         </dt> 
       <dd> 
          919-740-4206 
         </dd> 

      <dt> 
          Address 
         </dt> 
      <dd> 
          1042 Clay Street, San Francisco, CA 
         </dd> 
      </dl> 
    </div> 

    </body> 
</html> 



Here is my CSS: 


body, .details { 
    background: #ccc; 
} 

.header { 
    background: #222; 
    color: white; 
} 

dl dd { 
    color:white; 
} 

.header h1 { 
    font-size: 42px; 
} 

.header h2 { 
     font-family: "Georgia", Serif;  
     font-weight: normal; 
     font-style: italic; 
     color: #666; 
} 
+0

dlの周りにはどのような色が欲しいですか? – frontendzzzguy

答えて

2

まず、私はあなたがそれは私がこの

<link rel="stylesheet" href="style.css" /> 
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" /> 

なく

<link rel="stylesheet"href="style.css" /> 
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" /> 

のように読むべきであるCSSファイルで呼び出す方法で始まります次のようにしてdlに背景色を追加します。

dl { 
    background: red; /* or whatever colour you need */ 
    } 
関連する問題