在屏幕中间,单词需要更多地相互关联..

时间:2016-02-09 12:09:54

标签: html css

这似乎很容易解决,但我无法在stackoverflow上找到答案,也无法在互联网上找到解决我的小问题的答案。

我需要在屏幕中间显示更多这些http://prntscr.com/a0y8jm字词,并且我需要能够将这些字词放在彼此之间,我首先使用Padding,但我真的不认为工作得很好,而且填充物上的单词没有响应(因为我使布局不同)

任何人都有关于如何使这项工作的任何提示,如果你对我的代码的其他部分有一些提示,那些也是受欢迎的。我还没有那么久的编程,所以我可以使用我能得到的所有信息:)

这是我的代码,

body, html {
  margin-left: 10%;
  margin-right: 10%;
  padding: 0px;
  height: 100%;
  font-family: georgia, "Comic Sans MS";
  background-color: #f0f0f0;
}

header {
  height: 5%;
  border-bottom: thick solid grey;
}

.img {
  width: 25%;
  height: 30%;
  background-color:#f0f0f0;
  float: left;
}
.antwoord {
  float: left;
  width: 95%;
  height: 25px;
  background-color: white;
  border-style: solid;
  border-color: #000000;
  border-width: 4px;
}

.move1 {

}
.move2 {
margin-top: 12.5%
}
.move4 {
margin-top: 19%
}
.move5 {
margin-top: 33.5%
}
.move6 {
margin-top: 20.8%
}
.move7 {
margin-top: 37.5%
}

.word, .word .tekst, .word p {
  display: inline;
}
.my-row{
  clear: both;
}
.answers .word, .answers .word2{
  float: left;
  padding: 3px;
  width: 100px;
}

footer {
    border-top: thick solid grey;
    height: 5%;
    display : table-row;
    vertical-align : bottom;

}

.points {
    float: right;
}
.container {
  height:100%;
  border-collapse:collapse;
  display : table;
}
.igen {
  font-size: 25px;
  font-weight: bold;
}
.sprint {
  float: right;
}
.copyright {
  position: relative;
  bottom: 20px;
  left: 65px;
  font-size: 10px;
}
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>Words</title>

    <link rel="stylesheet" href="css/style.css" media="screen" title="no title" charset="utf-8">
    <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">

  <script>

  </script>

</head>
<body>

<header>
 <span class="fa fa-refresh" style="font-size:25px;"></span><span class="igen">&nbsp;igen</span>
 <span class="points"><i class="fa fa-thumbs-o-up" style="font-size:24px"></i>Rigtige:  &nbsp;&nbsp;&nbsp; 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i class="fa fa-thumbs-o-down" style="font-size:24px"></i>Forkerte: &nbsp;&nbsp;&nbsp; 0</span>
</header>

<div class="container">


      <div class="img" id="img1">
          <div class="plaatje" id="plaatje1"><center><img src="img/cat.jpg" alt="cat" width="50%;"></div>
          <div class="move1"><div class="antwoord" id="antwoord1"></div></div>
      </div>
      <div class="img" id="img2">
          <div class="plaatje" id="plaatje1"><center><img src="img/beak.jpg" alt="beak" width="50%;"></div>
            <div class="move2"><div class="antwoord" id="antwoord2"></div></div>
      </div>
      <div class="img" id="img3">
          <div class="plaatje" id="plaatje3"><center><img src="img/spoon.jpg" alt="spoon" width="50%;"></div>
          <div class="move3"><div class="antwoord" id="antwoord3"></div></div>
      </div>
      <div class="img" id="img4">
          <div class="plaatje" id="plaatje4"><center><img src="img/milk.jpg" alt="milk" width="50%;"></div>
          <div class="move4"><div class="antwoord" id="antwoord4"></div></div>
      </div>
      <div class="img" id="img5">
          <div class="plaatje" id="plaatje5"><center><img src="img/egg.jpg" alt="egg" width="50%;"></div>
          <div class="move5"><div class="antwoord" id="antwoord5"></div></div>
      </div>
      <div class="img" id="img6">
          <div class="plaatje" id="plaatje6"><center><img src="img/thee.jpg" alt="tea" width="50%;"></div>
          <div class="move6"><div class="antwoord" id="antwoord6"></div></div>
      </div>
      <div class="img" id="img7">
          <div class="plaatje" id="plaatje7"><center><img src="img/meel.jpg" alt="meel" width="50%;"></div>
          <div class="move7"><div class="antwoord" id="antwoord7"></div></div>
          </div>
          <div class="img" id="img8">
              <div class="plaatje" id="plaatje8"><center><img src="img/passport.jpg" alt="passport" width="50%;"></div>
          <div class="move8"><div class="antwoord" id="antwoord8"></div></div>
          </div>

          <div class="answers">
            <div class="my-row"> 
              <div class="word" id="word1">
                <div class="tekst" id="tekst1"> <p>Cat</p> </div>
              </div>
              <div class="word" id="word2">
                <div class="tekst" id="tekst2"> <p>spoon</p> </div>
              </div>
              <div class="word" id="word3">
                <div class="tekst" id="tekst3"> <p>meal</p> </div>
              </div>
              <div class="word" id="word4">
                <div class="tekst" id="tekst4"> <p>passport</p> </div>
              </div>
            </div>
            <div class="my-row">
              <div class="word2" id="word5">
                <div class="tekst" id="tekst5"> <p>egg</p> </div>
              </div>
              <div class="word2" id="word6">
                <div class="tekst" id="tekst6"> <p>beak</p> </div>
              </div>
              <div class="word2" id="word7">
                <div class="tekst" id="tekst7"> <p>tea</p> </div>
              </div>
              <div class="word2" id="word8">
                <div class="tekst" id="tekst8"> <p>milk</p> </div>
              </div>
            </div>
          </div>
<footer>
<img class="dansk" id="dansk" src="img/dansk2.jpg" alt="dansk" />
<img class="sprint" id="sprint" src="img/sprint2.png" alt="sprint" />
<center><span class="copyright"> &copy;2013 laerdansk / FC-Sprint&sup2; Leerbedrijf bronnen </span></center>
</footer>

</body>
</html>

0 个答案:

没有答案