2017-02-10 6 views
0

私はHTMLとCSSの初心者です。 今、私は困っています。 text-decoration: none;は私のためには機能しません。 あなたは私に解決策を見つけるのを手伝ってもらえますか?HTML/CSS - テキスト装飾が機能しない

* { 
 
    margin: 0px; 
 
    padding: 0px; 
 
} 
 

 
#Header { 
 
    width: auto; 
 
    height: 70px; 
 
    background-color: #647551; 
 
    margin-left: 0px; 
 

 
} 
 

 
#Header ul li { 
 
    text-decoration: none; 
 
    color: #645789; 
 
    float: left; 
 
    margin-left: 30px; 
 

 
}
<!DOCTYPE html> 
 
<html> 
 
    <head> 
 
     <link href="css/Main.css" type="text/css" rel="stylesheet" /> 
 
     <meta charset="utf-8"> 
 
     <title>Talkody - Gilles </title> 
 
    </head> 
 
    <body> 
 
     <div id="Header"> 
 
     <ul> 
 
      <li>Home</li> 
 
      <li>About</li> 
 
      <li>Portfolio</li> 
 
      <li>Contact</li> 
 
     </ul> 
 
     </div> 
 
     <p>Dit is een test website waar ik alles uittest, hierna ga ik er verder op in</p> 
 
     <img source="images/Logo/TalkodyLogo.ai" /> 
 

 
    </body> 
 
</html>

+1

それはすでに何の装飾を持っていません。 – bxorcloud

+0

'li'はデフォルトでテキスト装飾を持っていません。残りのCSSを確認してください。 – Turnip

+0

いいえ?私はChromeで実行しており、各単語の先頭に「弾丸」が表示されています。 – Gilles

答えて

0

あなたは箇条書きに

を削除するlist-style-type: none;を適用する必要があり、以下を参照してください:

* { 
 
    margin: 0px; 
 
    padding: 0px; 
 
} 
 

 
#Header { 
 
    width: auto; 
 
    height: 70px; 
 
    
 
    margin-left: 0px; 
 

 
} 
 

 
#Header ul li { 
 
    text-decoration: none; 
 
    color: #645789; 
 
    float: left; 
 
    margin-left: 30px; 
 
    list-style-type: none; 
 

 
}
<body> 
 
     <div id="Header"> 
 
     <ul> 
 
      <li>Home</li> 
 
      <li>About</li> 
 
      <li>Portfolio</li> 
 
      <li>Contact</li> 
 
     </ul> 
 
     </div> 
 
     <p>Dit is een test website waar ik alles uittest, hierna ga ik er verder op in</p> 
 
     <img source="images/Logo/TalkodyLogo.ai" /> 
 

 
    </body>

text-decoration: none; 

をテキスト装飾の下に削除されます

underline  Defines a line below the text 
overline  Defines a line above the text 
line-through Defines a line through the text 
0

何をしたい、それが使い、その後、リストから箇条書きを削除しますので、もしテキストは、すでに何の装飾を持っていない:

ul { 
    list-style-type: none; 
} 
0

あなたが箇条書きを削除したいときulから試してみてください:

#header ul { 
    list-style-type: none; 
} 

eleteが使用するリンクから下線:

#header li a { 
    text-decoration: none; 
    } 
0

あなたのCSSにこれを追加する:

#header ul { 
    list-style:none; 
} 
0

* { 
 
    margin: 0px; 
 
    padding: 0px; 
 
} 
 

 
#Header { 
 
    width: auto; 
 
    height: 70px; 
 
    background-color: #647551; 
 
    margin-left: 0px; 
 

 
} 
 

 
#Header ul li { 
 
    text-decoration: none; 
 
    color: #645789; 
 
    float: left; 
 
    margin-left: 30px; 
 
    list-style:none; 
 

 

 
}
<!DOCTYPE html> 
 
<html> 
 
    <head> 
 
     <link href="css/Main.css" type="text/css" rel="stylesheet" /> 
 
     <meta charset="utf-8"> 
 
     <title>Talkody - Gilles </title> 
 
    </head> 
 
    <body> 
 
     <div id="Header"> 
 
     <ul> 
 
      <li>Home</li> 
 
      <li>About</li> 
 
      <li>Portfolio</li> 
 
      <li>Contact</li> 
 
     </ul> 
 
     </div> 
 
     <p>Dit is een test website waar ik alles uittest, hierna ga ik er verder op in</p> 
 
     <img source="images/Logo/TalkodyLogo.ai" /> 
 

 
    </body> 
 
</html>

関連する問題