добрый день,
не могу разобраться, ка сделать что бы активная сслка в верхнем меню,.. была как при наведение + появлялось подчеркивание текста меню.
пробывал вставить код, который вы писали идут ошибки<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="utf-8"
indent="yes" method="html" omit-xml-declaration="no" version="1.0"
media-type="text/xml"/>
<xsl:template match="/document">
<ul class="top_menu gray_link">
<!-- Выбираем узлы структуры первого уровня -->
<xsl:apply-templates select="structure[show=1]"/>
</ul>
</xsl:template>
<xsl:template match="structure">
<!-- Запишем в константу ID структуры, данные для которой будут выводиться пользователю -->
<xsl:variable name="current_structure_id" select="/document/structure/current_structure_id"/>
<li>
<!-- Показывать ссылку, или нет -->
<xsl:if test="show_link=1">
<!-- Определяем адрес ссылки -->
<xsl:variable name="link">
<xsl:choose>
<!-- Если внешняя ссылка -->
<xsl:when test="is_external_link=1">
<xsl:value-of disable-output-escaping="yes" select="external_link"/>
</xsl:when>
<!-- Иначе если внутренняя ссылка -->
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="link"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<!-- Выделяем текущую страницу жирным (если это текущая
страница, либо у нее есть ребенок с ID, равным текущей) -->
<xsl:when test="current_structure_id=@id or count(.//structure[@id=$current_structure_id])=1">e
<a href="{$link}">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</a>
</xsl:when>
<!-- Иначе обычный вывод с пустым стилем -->
<xsl:otherwise>
<a href="{$link}">
<xsl:value-of disable-output-escaping="yes" select="name"/>
</a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!-- Если не показывать ссылку - выводим просто имя ссылки -->
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="name"/>
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:template>
</xsl:stylesheet>
CSS:
*{
margin:0px;
padding:0px;
}
img{border:0px;}
html{
width:100%;
height:100%;
}
body{
width:100%;
font-family:Arial,Helvetica,sans-serif;
}
#header{
width:100%;
background-color:#000000;
text-align:center;
}
.inside{
width:980px;
margin:0 auto;
overflow:hidden
}
.logo{
float:left;
margin:5px 38px 5px 0px;
}
.slogan{
font-family:Arial, Helvetica, sans-serif;
font-size:10px;
text-transform:uppercase;
color:#82837F;
line-height:30px;
border-left:1px solid #82837F;
padding:0 0 0 21px;
margin:40px 0 0 0;
float:left
}
.slogan_box
{
background-image:url('/images/site29/picture.jpg');
color: #262b14;
clear: both;
height:333px;
margin:0px auto;
width:980px;
}
.slogan2
{
color:#252a13;
font-size: 26pt;
text-align: right;
width: 400px;
padding: 110px 0px 0px 50px;
}
a
{
color: #FF8400;
}
.more
{
background-image: url("/images/site29/more.gif");
color: #a85c20;
display: block;
float: right;
font-size: 8pt;
height: 16px;
padding-top: 1px;
text-decoration: none;
text-align: center;
width: 70px;
}
.wrapper .more
{
margin-left: 10px;
}
.rss{
float:right;
margin:29px 52px 0 0
}
#menu{
background-image:url(/images/site29/menu_bg.gif);
background-position:top left;
background-repeat:repeat-x;
width:100%;
float:left;
height:40px;
}
#menu ul{
width:980px;
margin:0 auto;
padding:0 0 0 85px;
}
#menu li{
list-style-type:none;
display:inline;
}
#menu li a
{
color:#83abd6;
background-image:url('/images/site29/but1.gif');
float: left;
font-weight: bold;
font-size: 10pt;
height:40px;
line-height:37px;
text-transform:uppercase;
text-decoration: none;
width:148px;
/*padding-top: 10px;*/
}
#menu li a:hover
{
color:#FFFFFF;
background-image:url('/images/site29/but2.gif');
float: left;
font-weight: bold;
font-size: 10pt;
height:40px;
line-height:37px;
text-transform:uppercase;
text-decoration: none;
width:148px;
/*padding-top: 10px;*/
}
#menu li a:active
{
color:#FFFFFF;
background-image:url('/images/site29/but2.gif');
float: left;
font-weight: bold;
font-size: 10pt;
height:40px;
line-height:37px;
text-transform:uppercase;
text-decoration: underline;
width:148px;
/*padding-top: 10px;*/
}
#menu li a:no_active
{
color:#83abd6;
background-image:url('/images/site29/but1.gif');
float: left;
font-weight: bold;
font-size: 10pt;
height:40px;
line-height:37px;
text-transform:uppercase;
text-decoration: none;
width:148px;
/*padding-top: 10px;*/
#menu li a.last
{
background-image:url('/images/site29/but1.gif');
}
.pic{
margin:0 auto;
/* margin:-4px auto;*/
}
#blocks{
background-image:url(/images/site29/bg.gif);
background-position:top left;
background-repeat:repeat-x;
height:176px;
padding:27px 0 0 77px
}
.block1{
помогите разобраться пожалуйтса
вот ошибки сыпет какие
Предупреждение: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: li line 16 and xsl:choose in Entity, line: 52 в файле Z:\home\test1\www\modules\Xsl\Xsl.class.php (строка 267)
Предупреждение: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: template line 13 and li in Entity, line: 53 в файле Z:\home\test1\www\modules\Xsl\Xsl.class.php (строка 267)
Предупреждение: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: stylesheet line 2 and template in Entity, line: 54 в файле Z:\home\test1\www\modules\Xsl\Xsl.class.php (строка 267)
Предупреждение: DOMDocument::loadXML() [domdocument.loadxml]: Extra content at the end of the document in Entity, line: 55 в файле Z:\home\test1\www\modules\Xsl\Xsl.class.php (строка 267)