Página 1 de 1

ERRO Menu horizontal em CSS

Enviado: 18 Mar 2009, 15:53
por Nitro
Fala pessoal, minha 1° vez no FORUM e tenho um problema q está me tirando a paciência!

Desenvolvi um template em JOOMLA 1.5.9 e estou com uma dificuldade em aplicar o CSS no menu horizontal, criei um módulo "USER 2" e apliquei o CSS mas o efeito ñ aparece no site. Através do ADMIN criei o menu e ele aparece perfeitamente mas sem o efeito do css.

Segue o código da "index.php"

Código: Selecionar todos

<?php
/*
* @copyright	Copyright (C) 2008 - 2009 All rights reserved.
* @license		
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template.css" type="text/css" />
<?php if($this->direction == 'rtl') : ?>
<link href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template_rtl.css" rel="stylesheet" type="text/css" />
<?php endif; ?>

<!--[if lte IE 6]>
<link href="templates/<?php echo $this->template ?>/css/ie6only.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if lte IE 7]>
<link href="templates/<?php echo $this->template ?>/css/ie7only.css" rel="stylesheet" type="text/css" />
<![endif]-->

<!--ADD EFEITO ESCONDER COLUNA CASO Ñ SEJA USADA-->
<?php 
if($this->countModules('left and right') == 0) $contentwidth = "100";
if($this->countModules('left or right') == 1) $contentwidth = "80";
if($this->countModules('left and right') == 1) $contentwidth = "60";
?>
<!--FIM-->
<link href="css/template.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseurl;?>/templates/<?php echo $this->template;?>/js/md_stylechanger.js"></script>
</head>

<body>
<div id="wrap">
<!--TOPO-->
<div id="topo">
<div id="marca">
<div id="busca">
<!--BUSCA-->
<a href="index.php" title="Increase Text Size" onclick="changeFontSize(2);return false;"><img src="templates/<?php echo $this->template ?>/images/larger.png" alt="larger" width="37" height="26" border="0" /></a> <a href="index.php" title="Decrease Text Size" onclick="changeFontSize(-2);return false;"><img src="templates/<?php echo $this->template ?>/images/smaller.png" alt="smaller" width="37" height="26" border="0" /></a> <a href="index.php" title="Revert text styles to default" onclick="revertStyles(); return false;"><img src="templates/<?php echo $this->template ?>/images/reset.png" alt="reset" width="57" height="26" border="0" /></a>
<br />
<?php echo gmstrftime('Ilh&eacute;us/BA - %d/%m/%y');?>
<br />
<?php if($this->countModules('user1')) : ?>
<jdoc:include type="modules" name="user1" style="xhtml" />
<?php endif; ?>
</div>
<!--FIM BUSCA-->
<h1><?php echo $mainframe->getCfg('sitename');?></h1>
</div>

<!--MENU TOPO-->
<div id="menu_topo">
  <?php if($this->countModules('user2')) : ?>
<div id="navcontainer">
  <div id="navbar">
  <!--[if lte IE 7]>
		<script type="text/javascript">
		sfHover = function() {
			var sfEls = document.getElementById("navbar").getElementsByTagName("LI");
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].onmouseover=function() {
					this.className+=" sfhover";
				}
				sfEls[i].onmouseout=function() {
					this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				}
			}
		}
		if (window.attachEvent) window.attachEvent("onload", sfHover);
		</script>
<![endif]-->
  <jdoc:include type="modules" name="user2" style="xhtml" />
  </div>
</div>
<?php endif; ?>
</div>
<!--FIM MENU TOPO-->

<!--MIDIA TOPO-->
<div id="midia_topo">
<jdoc:include type="modules" name="midia" style="xhtml" />
</div>
<!--FIM MIDIA TOPO-->
</div>
<?php echo $this->params->get('showComponent'); ?>
<!--FIM TOPO-->

<!--CORPO-->
<!--ESQUERDA-->
<div id="corpo">
<?php if($this->countModules('left')) : ?>
<div id="left_menu">
<jdoc:include type="modules" name="left" style="xhtml" />
</div>
<?php endif; ?>
<!--FIM ESQUERDA-->

<div id="corpo_site">
<!--BRADECRUMB-->
<jdoc:include type="modules" name="breadcrumb" />
<!--FIM BRADECRUMB-->
<?php echo $contentwidth; ?>
<jdoc:include type="component" />
</div>

<!--DIREITA-->
<?php if($this->countModules('right')) : ?>
<div id="right_menu">
<jdoc:include type="modules" name="right" style="xhtml" />
</div>
<?php endif; ?>
</div>
<!--FIM DIREITA-->
<!--FIM CORPO-->

<!--RODAPÉ-->
<div id="footer"></div>
<div id="rodape">
<?php if($this->countModules('footer')) : ?>
<jdoc:include type="modules" name="footer" style="xhtml" />
<?php endif; ?>
</div>
<!--FIM RODAPÉ-->
</div>

</body>
</html>
Segue o código CSS:

Código: Selecionar todos

#navcontainer ul
{
padding-left: 0;
margin-left: 0;
background-color: #036;
color: White;
float: left;
width: 100%;
font-family: arial, helvetica, sans-serif;
}

#navcontainer ul li { display: inline; }

#navcontainer ul li a
{
padding: 0.2em 1em;
background-color: #036;
color: White;
text-decoration: none;
float: left;
border-right: 1px solid #fff;
}

#navcontainer ul li a:hover
{
background-color: #369;
color: #fff;
}
No ADMIN em Extensões - Administrar Módulos - Main Menu configurei "Sufixo de Classe do Módulo" como "_menu"

Alguém já passou por isso ou pode ajudar?

Desde já eu agradeço pela atenção de todos.

Re: ERRO Menu horizontal em CSS

Enviado: 18 Mar 2009, 17:30
por Nitro
Pessoal resumindo, esse é o código do "módulo topo":

Código: Selecionar todos

<!--MENU TOPO-->
<div id="menu_topo">
  <?php if($this->countModules('user2')) : ?>
<div id="navcontainer">
  <div id="navbar">
  <!--[if lte IE 7]>
      <script type="text/javascript">
      sfHover = function() {
         var sfEls = document.getElementById("navbar").getElementsByTagName("LI");
         for (var i=0; i<sfEls.length; i++) {
            sfEls[i].onmouseover=function() {
               this.className+=" sfhover";
            }
            sfEls[i].onmouseout=function() {
               this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
            }
         }
      }
      if (window.attachEvent) window.attachEvent("onload", sfHover);
      </script>
<![endif]-->
  <jdoc:include type="modules" name="user2" style="xhtml" />
  </div>
</div>
<?php endif; ?>
</div>
<!--FIM MENU TOPO-->

Re: ERRO Menu horizontal em CSS

Enviado: 18 Mar 2009, 17:38
por Nitro
Pessoal tópico encerrado!

No ADMIN em Extensões - Administrar Módulos - Main Menu - Parâmetros do Módulo o "Estilo de menu" estava em "Compatibilidade - Horizontal" eu configurei para "Compatibilidade - Lista Lisa" e o CSS do menu funcionou.

Fica aê a dica para qm tiver problemas na configuração do ADMIN!