본문 바로가기

coding/html

0517 / layout.html & css (header 영역 추가)

- layout.html

<div id="header" class="clearfix">

      <h1 class="logo">

        <a href="./all_contents.html" target="_blank">웹 기초</a>

      </h1>

      <div class="navigation">

        <ul>

          <li><a href="#">li_02</a></li>

          <li><a href="#">li_01</a></li>

          <li><a href="#">li_03</a></li>

          <li><a href="#">li_04</a></li>

          <li><a href="#">li_05</a></li>

          <li><a href="#">li_06</a></li>

        </ul>

      </div>

    </div>

----------------------------------------------------

- layout.css

#header  { width:100%height:auto; background-color#f06; }

 

  .logofloat:left; width:120pxheight:100px; background-color#ccc; }

  .logo > adisplay:block; width:100%height:100%; background-color#add; }

 

  .navigationfloat:right; width:400pxheight:100px; background-color#fc0; }

 

    .navigation ulwidth:100%height:100%; background-color:transparent; }

    .navigation lifloat:left; width:16.666666%height:100%; padding:10pxbox-sizing:border-box;

                        background-image:linear-gradient(45deg#cca#adf); }

 

    .navigation li > adisplay:block; width:100%height:100%; background-colorrgba(100,100,1000.3);

      /* background-color: #fff;  opacity:0.5; */ }

----------------------------------------------------

- 결과

 

'coding > html' 카테고리의 다른 글

0517 / reset_and_common.css  (0) 2021.05.17
0517 / psuedo.html & css  (0) 2021.05.17
0513 / layout.html (float속성 & clear속성)  (0) 2021.05.13
0512 / float.html (clearfix, clear:both 개념)  (0) 2021.05.13
0510 / layout.html 작성  (0) 2021.05.10