Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/12/2008, 23:42
Avatar de hCanté
hCanté
Colaborador
 
Fecha de Ingreso: marzo-2007
Ubicación: Guatemala
Mensajes: 233
Antigüedad: 17 años, 1 mes
Puntos: 9
Respuesta: Problema con cabezera

Hice un ejemplo de lo que yo veia que querias hacer con el primer código que colocaste, intenta con esto:

Código HTML:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>

<style type="text/css">

body, h1 {
    margin:0;
    padding:0;    
}

    div#cabecera {
        width:100%;
        background:#000;
    }
    h1 a {
        /* aqui coloca el estilo que quieres para tu h1 */
    }
    div#enlacescabecera {
        width::50%;
        float:right;
    }
    
    .clear {
        clear:both;    
    }

    
</style>

</head>

<body>

<div id="cabecera">

    <h1 class="titulocabezera">
        <a href="index.html" title="Ferrer Lantigua Website">Ferrer Lantigua Website</a>
    </h1>      

    <div id="enlacescabecera"> <!-- inicia enlaces cabecera --> 
        <a href="index.html">Portada</a> | 
        <a href="quiensoy.html">Quien soy </a> | 
        <a href="portafolio">Portafolio</a> | 
        <a href="contacto.html">Contacto</a>
    </div> <!-- termina enlaces cabecera -->

<div class="clear"></div> <!-- como usé un float en el div que viene de arriba necesito usar un clear:both; definido ya en el css. -->

</div> <!-- termina cabecera -->

</body>
</html>

Luego depende si quieres que los enlaces queden al mismo nivel del titulo, habria que usar un display:inline y flotar a la derecha el h1 talvez, o darle una altura en pixeles y/o un padding a los enlaces para que no queden tan pegados al cuadro que ahora esta de color negro.

Saludos!

Última edición por hCanté; 06/12/2008 a las 15:26 Razón: el tag [PHP] da problema con los signos.