八月 26, 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="xx部落格" href="{$url->getBaseUrl()}/summary.php">xx部落格</a></li></ul>
</div>



引用URL

http://blog2.cyhs.tp.edu.tw/teacher/trackback.php?id=182
回應文章