Trang

Thứ Năm, 18 tháng 8, 2016

Chi header làm 2 phần

1- Vào Mẫu (Template) => Chọn Chỉnh sử HTML (Edit HTML) (Không cần chobj mở rộng tiện ích mẫu)
2- Tìm đoạn code như sau:
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='Namkna blog (Tiêu đề)' type='Header'/>
</b:section>
- Thay thế thành:
<!-- header-wrapper http://namkna.blogspot.com/ -->
<div id='header-wrapper'>
      <b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
  <b:widget id='Header1' locked='true' title='Namkna blog (Tiêu đề)' type='Header'/>
</b:section>
      <b:section class='header' id='header2' maxwidgets='1' showaddelement='yes'>
</b:section>
<div style='clear:both;'/>
</div>
<!-- end header-wrapper http://namkna.blogspot.com/ -->
3- Thêm đoạn code sau vào trước thẻ: ]]></b:skin>
/* Headerby http://namkna.blogspot.com/ */
#header-wrapper{width:800px;border:0 solid #dcd9d9;margin:0 auto;height:100px}
#header-inner{background-position:center;margin-left:auto;margin-right:auto}
#header{float:left;width:300px;border:0 solid #dcd9d9;text-align:left;color:#333333;margin:0}
#header2{float:left;width:480px;margin-left:10px;text-align:left;color:#555}
.header .widget,.header2 .widget{margin:0 auto;padding:10px 0}
#header h1{line-height:1.2em;text-transform:uppercase;letter-spacing:.1em;font:normal normal 26px Georgia, Serif;margin:0 auto;padding:10px 5px .15em}
#header .description{max-width:100%;text-transform:uppercase;letter-spacing:.01em;line-height:1.2em;font:normal normal 16px Lucida Sans, Tahoma, Helvetica, FreeSans, sans-serif;color:#666666;margin:0 auto;padding:0 5px 5px}
#header img{margin-startside:auto;margin-endside:auto}

Tùy chỉnh:

  • width:800px; là dộ rộng của blog của bạn.
  • width:300px; là dộ rộng của header 1 tức là header bên tay trái
  • width:480px; là dộ rộng của header 2 tức là header bên tay phải
  • height:100px là chiều cao của header
4- Lưu mẫu lại và xem kết quả nha!