Foros del Web » Creando para Internet » CSS »

Como arreglo esto??

Estas en el tema de Como arreglo esto?? en el foro de CSS en Foros del Web. Pues nada, que tengo un lio que pa que jejejeje Resulta que estoy empezando a usar CSS para maquetar paginas, y tengo mas dudas que ...
  #1 (permalink)  
Antiguo 06/05/2008, 15:22
Avatar de flanagan44  
Fecha de Ingreso: abril-2004
Mensajes: 182
Antigüedad: 20 años
Puntos: 2
Como arreglo esto??

Pues nada, que tengo un lio que pa que jejejeje

Resulta que estoy empezando a usar CSS para maquetar paginas, y tengo mas dudas que nada mas, pero la cosa parecia que iba saliendo, hasta que lo he mirado con el Explorer ese de los webs..

Aqui la muestra:

http://printoner.milcentu.com

tampoco entiendo porque si pongo lo mismo en las distintas paginas en algunas me sale de una forma y en las otras de otra grrrrrrrrrrrrrr.

Aqui los codigos que uso:

index.php:

Código PHP:
<?php
    session_start
();
    if(
$_SESSION['client'])
    {
        
$nom=$_SESSION['nom'];
        
$tipus=$_SESSION['tipus'];
    }
    else
    {
        
$tipus=0;
    }
?>
<html>
<head>
<link rel="shortcut icon" href="imatges/favicon.ico" type="image/x-icon">
<title>Printoner</title>

<link href="css/estils.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="cont"></div>
<div id="esq"></div>
<div id="cap"></div>
<div id="dret"></div>
<?php
    
include "Admin/menu.php";
    include_once 
'Admin/funcions/bd.php';
    echo 
"<div id='general'>";
    
$connexio=connectarbd();
    
$consulta="SELECT * from noticies order by id";
    
$resultat=mysql_query($consulta);
    echo  
"<table width='636px' class='noticies'>";
    while(
$fila=mysql_fetch_array($resultat))
    {
?>
       
          <!--DWLayoutTable-->
          <tr>
            <td width="17" height="7"></td>
            <td width="134"></td>
            <td width="22"></td>
            <td width="421"></td>
            <td width="42"></td>
          </tr>
          <tr class="principal">
            <td height="24"></td>
            <th colspan="3" valign="top"><?php echo $fila['Titol'];?></th>
            <td></td>
          </tr>
          <tr>
            <td height="7"></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td height="12"></td>
            <td></td>
            <td></td>
            <td rowspan="3" valign="top"><?php echo $fila['Contingut'];?></td>
            <td></td>
          </tr>
          <tr>
            <td height="199">&nbsp;</td>
            <td valign="top"><img src="<?php echo $fila['Foto'];?>" width="134"></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td height="29"></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td height="16"></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr class="etapas">
            <td height="19"></td>
            <td></td>
            <td></td>
            <td valign="top"><a href="http://<?php echo $fila['Link'];?>">Segueix</a></td>
            <td></td>
          </tr>
          <tr>
            <td height="15"></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
<?php
    
}//fi while
    
echo "</table></div>";
?>
</body>
</html>
estils.css
Código:
#menu {
	position:fixed;
	left:2px;
	top:132px;
	width:197px;
	height:100%;
	z-index:1;
	background-color:#09ba73;
	font:Arial, Helvetica, sans-serif;
	font-size:10px;
}

a:link {font-family: Tahoma, Verdana, Arial;font-size:14px;text-decoration:none;outline:0; color:#000000;}
a:visited {font-family: Tahoma, Verdana, Arial;font-size:14px;text-decoration:none;outline:0; color:#ffffff;}
a:hover{font-family: Tahoma, Verdana, Arial;font-size:14px;text-decoration:underline;outline:0;}
a:active{font-family: Tahoma, Verdana, Arial;font-size:14px;text-decoration:none;outline:0;}

a.Link2:link { font-family: Tahoma, Verdana, Arial; color: #993300; text-decoration: none}
a.Link2:visited { font-family: Tahoma, Verdana, Arial; color: #CC9933; text-decoration: none}
a.Link2:hover { font-family: Tahoma, Verdana, Arial; color: #996666}
a.Link2:active { font-family: Tahoma, Verdana, Arial; color: #993300; text-decoration: none}

#Tcap{background-color:#CCCCCC;}
table.men{width:97%; top:2px; left:2px; position:absolute;}
 
#cap {
	position:fixed;
	margin:auto;
	width:100%;
	height:130px;
	z-index:100;
	background:url(../Admin/img/logo/logoa.jpg) no-repeat center center;
	top:0px;
}
#cont {
	position:fixed;
	margin:auto;
	top:0px;
	left:0px;
	width:100%;
	height:100%;
	z-index:0;
	background-color:#d7f4e9;
}
#esq {
	height:130px; 
	width:50%; 
	left:0px; 
	position:fixed; 
	background-color:#64ba9d; 
	z-index:1; 
	top:0px;
}
#dret {
	height:130px; 
	width:50%; 
	left:50%; 
	position:fixed; 
	background-color:#bfddd1; 
	z-index:1; 
	top:0px;
}
#general {
	position:relative;
	left:197px;
	top:130px;
	width:75%;
	height:75%;
	z-index:2;
}
#publi {
	position:absolute;
	left:50%;
	top:130px;
	background-color:#669900;
	width:100%;
	height:100%;
	z-index:1;
}
#Cistella {
position:absolute;
left:75%;
top:132px;
width:248px;
height:92px;
z-index:1;
overflow: scroll;
}
#Tcist
{
	position:absolute;
	left:75%;
	top:226px;
	z-index:1;
}
#titol {
position:absolute;
left:700px;
top:10px;
width:248px;
height:92px;
}
table.noticies
{
	position:absolute;
	border:1px solid #ccc;
	margin: 20px;
}
table.noticies tbody tr.principal th {
font: bold .9em/1.5em "Trebuchet MS", Tahoma, Arial, sans-serif;
color: #fff;
background: #5FACF3;
text-align: left;
padding: 5px;
border: 0;
}
table.noticies tbody tr.etapas th {
font:bold .9em/1.5em "Trebuchet MS", Tahoma, Arial, sans-serif;
color: #fff;
background: #DC4503;
text-align: left;
padding: 5px;
border-top: 1px solid #eee;
}
  #2 (permalink)  
Antiguo 06/05/2008, 15:23
Avatar de flanagan44  
Fecha de Ingreso: abril-2004
Mensajes: 182
Antigüedad: 20 años
Puntos: 2
Re: Como arreglo esto??

sigue:


productes.php

Código PHP:
<?php
    session_start
();
    if(
$_SESSION['client'])
    {
        
$nom=$_SESSION['nom'];
        
$tipus=$_SESSION['tipus'];
    }
    else
    {
        
$tipus=0;
    }
    if(
$_POST['prueba']!='true')
    {
        
$mar=isset($_GET['marca'])?$_GET['marca']:0;
        
$mod=isset($_GET['model'])?$_GET['model']:0;    
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" href="imatges/favicon.ico" type="image/x-icon">
<link href="css/estils.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Busqueda Multinivell</title>
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_jumpMenu2(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body>

<?php
include "Admin/menu.php";
if(
$tipus!=0)include "Admin/funcions/cistell.php";
?>
<div id="cont"></div>
<div id="esq"></div>
<div id="cap"></div>
<div id="dret"></div>
<div id="general">
<?php    
    
include_once 'Admin/funcions/bd.php';
    
$connexio=connectarbd();
    
$consulta="select * from marca order by Nom";
    
$resultat=mysql_query($consulta);
    echo 
"<form name='marca' id='marca'>";
      echo 
"Selecciona una marca per cercar: <select size=\"1\" onchange=\"MM_jumpMenu('parent',this,1)\">";
    if(
$mar==0)   # fem sortir el primer desplegable controlan si ja l'haviem seleccionat o no
    
{
        echo 
"<option value=''>Selecciona producte</option>"# fem el primer en blanc per poder seleccionar els altres
        
while ($fila mysql_fetch_array($resultat))
        {    
                echo 
"<option value='productes.php?marca=".$fila['Id_Marca']."'>".$fila['Nom']."</option>";
        }
           echo 
"</select>";
    }
    else
    {
        echo 
"<option value='productes.php'>Natejar dades</option>";
        while (
$fila mysql_fetch_array($resultat))
        {    
            if(
$mar==$fila['Id_Marca'])
            {
                    echo 
"<option value='productes.php?marca=".$fila['Id_Marca']."' selected>".$fila['Nom']."</option>";
            }
            else
            {
                echo 
"<option value='productes.php?marca=".$fila['Id_Marca']."'>".$fila['Nom']."</option>";
            }
        }
           echo 
"</select>";
        
        
#fem una consulta per mostrar una foto de la marca seleccionada
        
$consulta="select * from marca where id_marca =".$mar;
        
$resultat=mysql_query($consulta);
        
$fila mysql_fetch_array($resultat);
        echo 
"<img src='Admin/".$fila['Logo']."' width='150' height='65'><br>";
        
        
#segon desplegable
        
$consulta="select * from model where Id_Marca =".$mar." order by Id_Model";
        
$resultat=mysql_query($consulta);
        
          echo 
"Selecciona un model per cercar: <select size=\"1\" onchange=\"MM_jumpMenu2('parent',this,1)\">";
        if(
$mod=='0')
        {
            echo 
"<option value=''></option>";
            while (
$fila mysql_fetch_array($resultat))
            {    
                echo 
"<option value='productes.php?marca=".$mar."&model=".$fila['Id_Model']."'>".$fila['Id_Model']."</option>";
            }
            echo 
"</select>";
            
#echo "</form>";
        
}
        else
        {
            echo 
"<option value='productes.php?marca=".$mar."'>Natejar dades</option>";
            while (
$fila mysql_fetch_array($resultat))
            {    
                if(
$mod==$fila['Id_Model'])
                {
                    echo 
"<option value='productes.php?marca=".$mar."&model=".$fila['Id_Model']."' selected>".$fila['Id_Model']."</option>";
                }
                else
                {
                    echo 
"<option value='productes.php?marca=".$mar."&model=".$fila['Id_Model']."'>".$fila['Id_Model']."</option>";
                }
            }
            echo 
"</select>";
            
            
# fem una altre consulta per poder mostrar la foto del producte seleccionat
            
$consulta="select * from model where id_model ='".$mod."'";
            
$resultat=mysql_query($consulta);
            
$fila mysql_fetch_array($resultat);
            echo 
"<img src='Admin/".$fila['Foto']."' width='150' height='150' /><br>";
            echo 
"</form>";
            
            
# ara ja tenim seleccionat el model i la marca, ens falta llistar els cartutxs que li corresponen
            # estan guardats a les variables $mod i $mar
            
            
$consulta="select * from model_cons,tipus_cons,tipus,consumible where consumible.id_consumible=model_cons.id_consumible and tipus.id_tipus=tipus_cons.id_tipus and model_cons.id_consumible=tipus_cons.id_consumible and model_cons.id_model='".$mod."'";
            
$resultat=mysql_query($consulta);
            
            
# fem una consulta per saber quin usuari ens ho demana
            
            
$consulta2="select * from permisos where id_permis=".$tipus;
            
$resultat2=mysql_query($consulta2);
            
$fila2=mysql_fetch_array($resultat2);
            
$descompte=$fila2['Desc'];
            
            
#dibuixem la taula
            
echo "<table width='100%' border='1'>";
            echo 
"<tr bgcolor='#CCECE4'><td width='40'></td><td>Referència</td><td>Descripció</td><td>Tipus</td><td>Preu</td><td>Estoc</td><td>Quantitat</td><td>Afegir</td></tr>";
            
$salt=0;
            while (
$fila mysql_fetch_array($resultat))
            {
                if(
$tipus!=0#controlar que si no esta registrat no posi el preu
                
{
                    
$preu=$fila['Preu']/$descompte;
                    
$preu=round($preu,2)." €";
                    
$qtt="<input name='qtt' type='text' size='3' maxlength='3' value='0' align='right'>";
                }
                else
                {
                    
$preu="<font color='#FF0000'>Consultar</font>";
                    
$qtt=" <font color='#FF0000'>---</font> ";
                    
                }
                if(
$fila['Habilitar']==1)
                {
                    if(
$tipus!=0)
                    {
                        echo 
"<form name='form".$num."' action='productes.php' method='post'>";
                        
# variables per pasar al proxim pag
                        
echo "<input name='prueba' type='hidden' value='true'>";
                        echo 
"<input name='marca' type='hidden' value='".$mar."'>";
                        echo 
"<input name='model' type='hidden' value='".$mod."'>";
                        echo 
"<input name='id' type='hidden' value='".$fila['Id_Consumible']."'>";
                        echo 
"<input name='tip' type='hidden' value='".$fila['Id_Tipus']."'>";
                        
####################################
                    
}
                    if(
$salt==0)
                    {
                        echo 
"<tr><td><img src='Admin/".$fila['Foto']."' width='40' height='40'></td>";                
                        
$salt=1;
                    }
                    else
                    {
                        echo 
"<tr bgcolor='#BAD8DE'><td><img src='Admin/".$fila['Foto']."' width='40' height='40'></td>";    
                        
$salt=0;
                    }
                    echo 
"<td>".$fila['Id_Consumible']."</td>";
                    echo 
"<td>".$fila['Descripcio']."</td>";
                    echo 
"<td>".$fila['Nom']."</td>";
                    echo 
"<td>".$preu." </td>";
                    echo 
"<td>".$fila['Stock']."</td>";
                    echo 
"<td>".$qtt."</td>";
                    if(
$tipus!=0)
                    {
                        echo  
"<td><a class='enlace' href='#' onclick='document.forms.form".$num.".submit();return false'><img src='imatges/carro.gif' width='30' height='25' border='0' alt='enviar'></a></td></tr></form>";
                        
$num=$num+1;
                    }
                    else
                    {
                        echo 
"<td><a href='#'><img src='imatges/bloq.gif' width='30' height='25' border='0'></a></td></tr>";
                    }
                }
            }
            echo 
"</table>";
        }
    }
?>
</div>
</body>
</html>
<?php
}
else
{
    include_once 
'Admin/funcions/bd.php';
    
    
$mar=isset($_POST['marca'])?$_POST['marca']:'';
    
$mod=isset($_POST['model'])?$_POST['model']:'';
    
    
$connexio=connectarbd();
    
$consulta="insert into cistella (Id_Consumible,Id_Usuari,Id_Tipus,Quantitat) values('".$_POST['id']."',".$_SESSION['usr'].",".$_POST['tip'].",".$_POST['qtt'].")";
    
    
$resultat=mysql_query($consulta);
    
header("Location:productes.php?model=".$mod."&marca=".$mar);                    
    exit;                                                
}
?>


bueno, si alguien puede ayudarme me hariais un gran favor

gracias por adelantado
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:39.