← HTML + CSS

H1 no logo

Lida 3163 vezes

Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Estou aqui com um problemazito.

Estou a tentar colocar o logo de um site também com o h1 em texto só que ele deixa de estar "clicável", algo que não queria.

por defeito está assim.

Código: [Seleccione]
/*---------------------------------------------------------------------------------*/
/* HEADER */
/*---------------------------------------------------------------------------------*/
#headerwrapper{ background:none; width:970px; margin:15px auto 0px auto; padding:0px; }
#header{ background:none; height:80px; }
.logo{ background:url(images/logo.png) no-repeat; float:left; width:350px; height:60px; margin:10px 0px 0px 0px; padding:0px; }
.logo h1 { display: none; }
.ad468x60{ float:right; width:468px; height:60px; padding:0px; }
.ad468x60 img{ border:none; }

Código: (php) [Seleccione]
<div id="headerwrapper">

<div id="header"> <a href="<?php bloginfo('siteurl'); ?>" title="<?php bloginfo('name'); ?>">

  <div class="logo">  </div>

  <!--end: logo-->

  </a>

  <?php include('ads/header468x60.php'); ?>

</div>

  <!--end: header-->

Obrigado desde de já
Offline

mapb_1990 
Membro
Mensagens 109 Gostos 0
Feedback +2

Troféus totais: 26
Trófeus: (Ver todos)
Level 5 Tenth year Anniversary Windows User Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2

nao entendi o k keres, mas n é isto?

Código: (php) [Seleccione]
<div id="headerwrapper">

<div id="header">
<a href="<?php bloginfo('siteurl'); ?>" title="<?php bloginfo('name'); ?>" class="logo"></a>

  <?php include('ads/header468x60.php'); ?>

</div>

  <!--end: header-->

ou isto, para mostrar o h1

Código: (css) [Seleccione]
/*---------------------------------------------------------------------------------*/
/* HEADER */
/*---------------------------------------------------------------------------------*/
#headerwrapper{ background:none; width:970px; margin:15px auto 0px auto; padding:0px; }
#header{ background:none; height:80px; }
.logo{ background:url(images/logo.png) no-repeat; float:left; width:350px; height:60px; margin:10px 0px 0px 0px; padding:0px; }
.logo h1 { display: inline; }
.ad468x60{ float:right; width:468px; height:60px; padding:0px; }
.ad468x60 img{ border:none; }
Offline

Fernando Augusto 
Membro
Mensagens 922 Gostos 0
Feedback +1

Troféus totais: 30
Trófeus: (Ver todos)
Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3

Só vi agora a tua resposta, obrigado, mas já resolvi.

Código: (php) [Seleccione]
<div id="headerwrapper">

   <div id="header">

           <h1 style="position:absolute;left:-9999em"><?php bloginfo'name' ); ?></h1>

<a href="<?php bloginfo('siteurl'); ?>" title="<?php bloginfo('name'); ?>">
 
     <div class="logo">  </div>
     
     <!--end: logo-->
     
     </a>
     
     <?php include('ads/header468x60.php'); ?>
     
    </div>
     
     <!--end: header-->
Offline

Pedro Magalhães 
Membro
Mensagens 397 Gostos 0
Troféus totais: 23
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 4 Level 3 Level 2 Level 1 100 Posts

Uso sempre o h1 no logo. Já agora fica o css que utilizo:

Código: [Seleccione]

<h1><a href="#">Nome do site</a></h1>

h1 a {
    background: url("xpto.png") top center no-repeat;
    display: block;
    text-indent: -9999px;
    height: 41px;
    width: 255px;
}

Offline

Pedro Magalhães 
Membro
Mensagens 397 Gostos 0
Troféus totais: 23
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 4 Level 3 Level 2 Level 1 100 Posts

Já não uso o código anterior :)
Agora uso sempre o logo no HTML e não no CSS.