Để dễ tưởng tượng bạn có thể tham khảo bài Top 25 menu dọc “vertical” đẹp và hữu ích các hình thức hiển thị menu kiểu dọc. Áp dụng thủ thuật này cho Label bạn không cần phải thực hiện công đoạn chèn và chỉnh sửa link liên kết.
Trong bày xin giới thiệu Cách thực hiện menu từ Label có hiển thị như hình minh họa trên:

- Tìm (Ctrl-F) đoạn mã: ]]>
- Chèn đoạn code css
#menu-label ul {
list-style: none; margin: 0; padding: 0;
}
#menu-label img {
border: none;
}
#menu-label {
width: 200px; border-style: none solid none solid; border-color: #D0D0D0; border-width: 1px; margin: 10px;
}
#menu-label li a {
height: 32px; font-family: Verdana, Arial, Helvetica, sans-serif; margin: 0; font-size: 10pt; font-weight: bold; background: #FFF; height: 24px; text-decoration: none;
}
#menu-label li a:link,
#menu-label li a:visited {
color: #777; display: block; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjphvfBUuml7wvFEGWaKCweZ1iBqVWh7grj2JtagNXS6C9AyPzNFTLtDwYM3RhHmp3rdKt3MCsSVcL66nFgHGQb57D1MwPm-eFqA2ras5h90aqxhT6YRHg1GRet5FxRWa7XYU4OL9fW-I/s800/menu5.gif); padding: 8px 25px 0 10px; text-align: right;
}
#menu-label li a:hover,
#menu-label li
#current {
color: #fff; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjphvfBUuml7wvFEGWaKCweZ1iBqVWh7grj2JtagNXS6C9AyPzNFTLtDwYM3RhHmp3rdKt3MCsSVcL66nFgHGQb57D1MwPm-eFqA2ras5h90aqxhT6YRHg1GRet5FxRWa7XYU4OL9fW-I/s800/menu5.gif) 0 -32px; padding: 8px 25px 0 10px; text-align: right; }
#menu-label li a:active {
color: #fff; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjphvfBUuml7wvFEGWaKCweZ1iBqVWh7grj2JtagNXS6C9AyPzNFTLtDwYM3RhHmp3rdKt3MCsSVcL66nFgHGQb57D1MwPm-eFqA2ras5h90aqxhT6YRHg1GRet5FxRWa7XYU4OL9fW-I/s800/menu5.gif) 0 -64px; padding: 8px 25px 0 10px; text-align: right;
}
vào trước Đoạn code ]]> list-style: none; margin: 0; padding: 0;
}
#menu-label img {
border: none;
}
#menu-label {
width: 200px; border-style: none solid none solid; border-color: #D0D0D0; border-width: 1px; margin: 10px;
}
#menu-label li a {
height: 32px; font-family: Verdana, Arial, Helvetica, sans-serif; margin: 0; font-size: 10pt; font-weight: bold; background: #FFF; height: 24px; text-decoration: none;
}
#menu-label li a:link,
#menu-label li a:visited {
color: #777; display: block; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjphvfBUuml7wvFEGWaKCweZ1iBqVWh7grj2JtagNXS6C9AyPzNFTLtDwYM3RhHmp3rdKt3MCsSVcL66nFgHGQb57D1MwPm-eFqA2ras5h90aqxhT6YRHg1GRet5FxRWa7XYU4OL9fW-I/s800/menu5.gif); padding: 8px 25px 0 10px; text-align: right;
}
#menu-label li a:hover,
#menu-label li
#current {
color: #fff; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjphvfBUuml7wvFEGWaKCweZ1iBqVWh7grj2JtagNXS6C9AyPzNFTLtDwYM3RhHmp3rdKt3MCsSVcL66nFgHGQb57D1MwPm-eFqA2ras5h90aqxhT6YRHg1GRet5FxRWa7XYU4OL9fW-I/s800/menu5.gif) 0 -32px; padding: 8px 25px 0 10px; text-align: right; }
#menu-label li a:active {
color: #fff; background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjphvfBUuml7wvFEGWaKCweZ1iBqVWh7grj2JtagNXS6C9AyPzNFTLtDwYM3RhHmp3rdKt3MCsSVcL66nFgHGQb57D1MwPm-eFqA2ras5h90aqxhT6YRHg1GRet5FxRWa7XYU4OL9fW-I/s800/menu5.gif) 0 -64px; padding: 8px 25px 0 10px; text-align: right;
}
width: 200px; là chiều rộng của Sidebar, bạn thay đổi giá trị này tùy thuộc vào chiều rộng của sidebar trong mẫu Template.
- Tìm (Ctrl-F) đoạn mã dưới:
Nếu muốn thêm menu khác nữa ta chỉ việc thêm đọan code :
bên dưới vào ngay sau dòng code màu xanh là được.
Bạn có thể tham khảo thêm bài Top 25 menu dọc “vertical” đẹp và hữu ích để chọn các CSS hợp với mẫu Blog của bạn.
0 comments
Post a Comment