2014-10-25 5 views
1

에 중첩 된 앵커 태그에 패딩을 추가 할 수 없습니다 내 말대꾸는 말을 밖으로 erroring 유지 :은 바닥 글 내 바닥 글에 내 앵커에 패딩을 추가하려고

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> 

없음 왜 그런지. 내 구문에 문제가 생기지 않는다.

+1

@ NiMa와는 달리, 클래스 내에 앵커 태그를 사용할 수 있습니다. 코드가 작동하지 않는 이유는'top : 1.5em' 뒤의';'를 잊어 버린 때문입니다. 그리고 @NiMa가 작동하는 이유는'top : 1.5em' 다음에 셀렉터를 닫고 Sass를 사용할 때 안되는 앵커 태그로 반복하기 때문입니다. – Jrn

+0

@Jrn +1 당신이 맞습니다 –

답변

1

나는 당신이 세미콜론 라인 (25)에 선언을 종료하는 것을 잊었다처럼

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

그래,하지만 난 원래의 나던 작동 왜 이해가 안되기 때문에 나는 정말 scss 답변을 바라고 누군가가 그걸 설명 할 수 있습니까? – Jarg7

+0

실제로 당신은 클래스 내에서 앵커 태그를 사용할 수 없습니다 –

+0

나는 그 이유를 궁금해합니다. – Jarg7

0

이 보이는 문제를 해결 같아요.

25: top:1.5em; 
관련 문제