七月 13, 2006

[模版] 如何增加頁首的水平選單

想要加入如同阿杰老師網誌上的水平選單嗎?

你必須要在 roodo.cssheader.template 兩個檔案中加入程式碼!


roodo.css 加入程式碼

/* 水平選單 */

#hnav {

font-size: small;

}


#hnav li ul li a { /* for sub-menu items */
/* Apply the width here (not to li) so that IE regards entire width as clickable */
/* This also seems to fix the "3px gap between list items" bug in IE. */
width: 6em;
border-top-style: none; /* to get single line between items */
padding: 1px 10px 2px 10px;
}
/* note: important to keep ordering of LVHA link, visited, hover, active */
#hnav ul li { display: inline; }

#hnav ul li a
{

padding: 0.2em 1em;
background-color: #121212;
color: #bfbfbf;
text-decoration: none;
border-right: 1px solid #fff;
}

#hnav ul li a:hover
{
background-color: #94C22C;
color: #fff;
}

#navlist li #current
{
color: #799F27;
}


header.template 加入程式碼

你可以依需求去增減或修改程式碼!

<!----------------------------------------------------------------------------
頁頭主選單
---------------------------------------------------------------------------->
<div id="hnav"><ul>
<li><a title="{$locale->tr("main")}" href="{$url->blogLink()}">{$locale->tr("main")}</a></li>


<li><a title="{$locale->tr("archives")}" href="{$url->templatePage("archives")}">{$locale->tr("archives")}</a></li>


<li><a title="{$locale->tr("links")}" href="{$url->templatePage("bookmark")}">{$locale->tr("links")}</a> </li>


<li><a title="{$locale->tr("admin")}" href="{$url->getAdminUrl()}">{$locale->tr("admin")}</a></li>


<li><a class=aside title="臺北市教師研習中心部落格" href="{$url->getBaseUrl()}/summary.php">北市教研中心部落格</a></li></ul>
</div>



發佈者: 陳怡杰 老師 at 13:25│  點閱次數 (438)│ 修改文章管理迴響迴響 (0)95年7月-部落格教學應用班
回應文章
(必要)
authimage