无法在页脚中添加填充到嵌套锚标记

时间:2014-10-25 05:27:12

标签: html css sass

尝试在我的页脚中添加一个填充到我的锚点,我的sass不断说错:

Syntax error: Invalid CSS: a space is required between a property and its definition
              when it has other properties nested beneath it.
        on line 26 of /Users/Jarg/Desktop/web/omegascss/scss/app.scss

21:   margin-bottom: 3rem;
22: }
23: .footerlinks {
24:   position:relative;
25:   top:1.5em
26:   a {
27:    padding: 10px;
28:   }
29:   
30: }
31: .container{ 

HTML:

   <footer>
    <div class="row footerlinks">
      <div class="large-6">
        <a href="services.html#printing">Print Media</a>
        <a href="services.html">Web Development</a>
        <a href="services.html">Promotional Items</a></div>
      </div>
    <div class="large-6">

    </div>


    </footer>

不知道为什么。我的语法没有看错。

2 个答案:

答案 0 :(得分:1)

我猜它解决了这个问题

margin-bottom: 3rem;
     }
     .footerlinks {
       position:relative;
       top:1.5em;
       }
     .footerlinks a
     {
    padding: 10px;
    }
     .container{

答案 1 :(得分:0)

您似乎忘了用分号关闭第25行的声明。

25:   top:1.5em;