• 카테고리

    질문 & 답변
  • 세부 분야

    자격증 (디자인)

  • 해결 여부

    미해결

요렇게 따라해보았는데요,

21.03.22 17:09 작성 조회수 112

1

요렇게 따라해 보았는데요
어느부분이 잘못됐는지 공지사항 부분의 디자인이 바뀌지 않네요ㅠㅠ
.tab-inner.tab a {
    display:block;
디스플레이 블럭을해도 텍스트가 그대로 입니다.

어디가 잘못됐을까요?





<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>공지사항,갤러리 별도로</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
   <div class="container">
       <div class="header-inner">
           <header>
           <article class="header-logo">로고</article>
            <article class="navi">네이게이션</article>
           </header>
       </div>
   </div>
    <div class="content-inner">
        <section class="slide">
         <article>이미지슬라이드</article>
        </section>
 
   <section class="items">
       <article class="news">
           <div class="tab-inner">
               <div class="btn">
                   <span>공지사항</span>
               </div>
           
           <div class="tab">
               <a href="#none">SMS 발송 서비스 개선작업  <b>2020.01.09</b></a>
                            <a href="#none">휴대폰 인증 서비스 개선 작업 <b>2020.01.07</b></a>
                            <a href="#none">카드사 부분 무이자 할부 이벤트 <b>2019.12.31</b></a>
                            <a href="#none">올앳 시스템 작업 안내  <b>2019.12.20</b></a>
                            <a href="#none">휴대폰 결제 시스템 작업 안내 <b>2019.12.20</b></a>
           </div>
           </div>
           
       </article>
       <article class="gallery">
           <div class="gallery-inner">
               <div class="btn">
                   <span>갤러리</span>
               </div>
               <div class="tab">
                  <a href="#none"><img src="images/gallery-01.jpg" alt="gallery1"></a>
                            <a href="#none"><img src="images/gallery-02.jpg" alt="gallery2"></a>
                   <a href="#none"><img src="images/gallery-03.jpg" alt="gallery3"></a>
                   
               </div>
           </div>
       </article>
       <article class="shortcut">바로가기c.3</article>
   </section>
                
               
       <div class="footer-inner">
       <footer>
       <article class="footer-logo">copyright</article>
       <article class="footer-content">
           <div>sns</div>
           <div>패밀리 사이트</div>
           
       </article>
       </footer>
       </div>
  </div>
</body>
</html>
      -----------------------------------------
css부분은 이렇게 따라해보았는데요 

body{
    margin: 0;
    font-size: 15PX;
    color:#222;
    line-height: 1.6em;
    background-color: #fff;
}
a {
    text-decoration: none;
    color:#222
}


.container{}
.header-inner {
    background-color: #eee;
}
header {
    border:1px solid #ccc;
    width: 1200px;
    margin: auto;
    height: 100px;
}
header article {
    height: 100px;
    border: 1px solid #ccc;
}
.header-logo {
    width: 200px;
    float: left;
    text-align:center;
    line-height:100px;
}
.navi {
    width: 600px;
    float: right;
    text-align: center;
    line-height: 100px;
}
.content-inner{
    width: 1200px;
    margin: auto;
    
}
.slide {
    width: 1200px;
    text-align: center;
    line-height: 100px;
    clear:both;
    
}
.slide article {
    border: 1px solid #ccc;
    height: 300px;
}
.items {
    overflow: hidden;
   /* margin-top: 20px;*/
}
.items article {
    border: 1px solid #ccc;
    height: 200px;
    float: left;
    box-sizing:border-box;
   width: 33.3333%;
}
.news {}
.gallery {}
.shortcut{
    text-align: center;
    line-height: 200px;
}
.footer-inner {
    background-color: #eee;
}
footer {
    width: 1200px;
    margin: auto;
    overflow: hidden;
}
footer article {
    border: 1px solid #ccc;
    height: 100px;
    float: left;
    box-sizing:border-box;
}
.footer-logo {
    width: 1000px;
    text-align: center;
    line-height: 100px;
}
.footer-content {
    width: 200px;
    text-align: center;
    line-height: 100px;
}
.footer-content div {
    border: 1px solid #ccc;
    height: 50px;
    text-align: center;
    line-height: 50px;
}

.tab-inner {}
.tab-inner.btn {}
.tab-inner.btn span {
    border: 1px solid black;
    display: inline-block;
    width: 100px;
    text-align:center;
    padding: 5px;
    border-radius: 5px;
}
.tab-inner.tab {}
.tab-inner.tab a {
    display:block;
}
.tab-inner.tab a b {
    float: right;
}



           

       
   
   
   
    

답변 1

답변을 작성해보세요.

2

아래 코드를 보시면 아시겠지만 .tab-inner와 .btn이 스페이스 없이 붙어 있어요.

이래서 그런 것 같아요. 반드시 .tab-inner  .btn 이렇게 두개 클래스네임 사이에 띄어쓰기가 있어야 합니다.

아래처럼 띄어쓰기 해주세요.

.tab-inner  .btn {}

.tab-inner  .btn span {}

.tab-inner  .tab {}

.tab-inner  .tab a {}

.tab-inner  .tab a b {}

hjini12님의 프로필

hjini12

질문자

2021.03.23

.답답함이 풀렸어요. 감사합니다