2017-01-21 1 views
0

私のウェブサイトの私のロゴは、ページの左上にあるはずです。それはどちらかといえば、今はちょっと左に近い。私はそれを右に18ピクセル動かしたい。しかし、私はそれを動かすことができません。私は自分のロゴのために '.content img'を作成しようとしましたが、うまくいきませんでした。何か案は?18pxのロゴを左側からどのように動かすことができますか?

 .content { 
 
     position: absolute; 
 
     width: 100%; 
 
     min-height: 100%; 
 
     z-index: 1000; 
 
     background-color: rgba(0,0,0,0.7); 
 
     } 
 
     .content h1 { 
 
     text-align: center; 
 
     font-size: 80px; 
 
     text-transform: uppercase; 
 
     font-weight: 300; 
 
     color: #fff; 
 
     padding-top: 4.5%; 
 
     margin-bottom: 10px; 
 
     } 
 
     .content p { 
 
     text-align: center; 
 
     font-size: 20px; 
 
     letter-spacing: 3px; 
 
     color: #aaa; 
 
     } 
 

 
     .contect img { 
 
     margin-left: 18px; 
 
     }
<!DOCTYPE html> 
 
<html> 
 

 
<head> 
 

 
    <script src = "jquery-3.1.1.min.js"></script> 
 

 
    <script src = "script.js"></script> 
 

 
    <link rel = "stylesheet" href="style.css"> 
 

 
    <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> 
 

 
    <link href="https://fonts.googleapis.com/css?family=Open+Sans|Passion+One|Source+Code+Pro" rel="stylesheet"> 
 

 
    <title> AL-SABA.net </title> 
 

 
</head> 
 

 
<body> 
 

 
<header> 
 

 
    <div class = "content"> 
 
          <img src = "logo6.png" /> 
 

 
          <h1> Title </h1> 
 
          <p>Design • Code • Programs </p> 
 
    </div> 
 

 
</header> 
 

 
    \t \t <link href='http://fonts.googleapis.com/css?family=Varela+Round' rel = 'stylesheet' type = 'text/css'> 
 

 
    <div class="background-wrap"> 
 
     <video id="video-bg-elem" preload="auto" autoplay="true" loop="loop" muted="muted"> 
 
     <source src="coding.mp4" type="video/mp4"> 
 
     Video not supported 
 
     </video>   
 
    </div> 
 

 
<div class="arrow bounce"> 
 
</div> 
 

 
<footer> 
 
</footer> 
 

 
</body> 
 

 
</html>

+0

「.content」と「.contect」のスペルが間違っています。代わりに '.content img'を使用してください。 –

答えて

2

あなたのコードでは、タイプミスがあり、それが ".contect IMG" と言います。これを試してみてください:

.content img { 
    margin-left: 18px; 
} 
+0

LOL、それを指摘してくれてありがとう! :) –

関連する問題