Ver Mensaje Individual
  #7 (permalink)  
Antiguo 02/05/2008, 12:41
Avatar de salbatore
salbatore
 
Fecha de Ingreso: abril-2007
Ubicación: Springfield
Mensajes: 1.567
Antigüedad: 17 años, 1 mes
Puntos: 19
Sonrisa Re: Menu y pestañas coloreadas

Hola de nuevo...

He estado mirando las opciones que me sugeris pero no he encontrado nada claro. Por ahora he conseguido por medio de php que segun donde estes el div cambie de id. Todavia me falta hacer que al pasar por cada div cambie de color...

Mirar lo hago con:


Código PHP:
<?php
    
if ($_SERVER['REQUEST_URI'] == "index.php") {$menu_index "menu_index_active";}
        else{
$menu_index "menu_index";}
    if (
$_SERVER['REQUEST_URI'] == "view.php") {$menu_view "menu_view_active";}
        else{
$menu_view "menu_view";}
    if (
$_SERVER['REQUEST_URI'] == "insert.php") {$menu_insert "menu_insert_active";}
        else{
$menu_insert "menu_insert";}
    if (
$_SERVER['REQUEST_URI'] == "register.php") {$menu_register "menu_register_active";}
        else{
$menu_register "menu_register";}
?>
<div id="menu">
<div id="<?php echo $menu_index ?>"><a href="index.php">index</a></div>
<div id="<?php echo $menu_view ?>"><a href="view.php">view</a></div>
<div id="<?php echo $menu_insert ?>"><a href="insert.php">insert</a></div>
<div id="<?php echo $menu_register ?>"><a href="register.php">register</a></div>
</div>
Y la hoja con los css:

Código HTML:
/* menu */
	#menu { width:700px; height:35px;  margin: 0 auto;}
		#menu_index { margin-left:10px; margin-right:10px; height:35px; float:left}
		#menu_index_active { padding-left:10px; padding:10px; height:35px; background:#FF0000; float:left}
		#menu_view { margin-left:10px; margin-right:10px; height:35px; float:left}
		#menu_view_active { padding-left:10px; padding:10px; height:35px; background:#FF0000; float:left}
		#menu_insert { margin-left:10px; margin-right:10px; height:35px; float:left}
		#menu_insert_active { padding-left:10px; padding:10px; height:35px; background:#FF0000; float:left}
		#menu_register { margin-left:10px; margin-right:10px; height:35px; float:left}
		#menu_register_active { padding-left:10px; padding:10px; height:35px; background:#FF0000; float:left}
Aunque es un codigo tonto, sirve... dentro de un rato subo todo, con el cambio de color al pasar el raton...

Última edición por salbatore; 02/05/2008 a las 12:53