...

View Full Version : Resolved Remove H1 tag from logo div



Webpacks
02-14-2011, 05:13 PM
Hi Guys

I'm using a wordpress theme for a website I'm building and it has an H1 tag on the logo image in the CSS...I'm trying to get remove the H1 tag but keep the logo and the link to the home page...but not having much success, the code and CSS looks like this:


<div class="container"> <div class="logo"><h1 onclick="location.href='<?php echo get_option('home'); ?>/'"><?php bloginfo('name'); ?></h1></div></div>


#header {height:532px; }
#header .indent-1{
position:absolute;
width:630px;
height: 100px;
margin-top: 5px;
margin-right: 0;
margin-bottom: 0;
margin-left: 333px;
}
#header .indent2{ position:absolute; margin:64px 0 0 304px; width:664px; background:url(images/bg_menu.gif) top left no-repeat; z-index:20}
#header {font-size:0.75em; color:#FFFFFF; background:#ffffff }
#header .logo {
padding-top: 25px;
padding-right: 0px;
padding-bottom: 10px;
padding-left: 15px;
}
#header .logo h1 {
display:block;
overflow:hidden;
width:289px;
height:99px;
font-size:2.1em;
color:#000;
text-indent:-1000em;
cursor:pointer;
background-image: url(images/logo.jpg);
background-repeat: no-repeat;
background-position: 0 0;
}
#header .logo h1:hover { text-decoration:none;}

Any advice would be very much appreciated.

Many thanks in advance :cool:

Boz :)

abduraooft
02-14-2011, 05:34 PM
Can we have a link to your page?

Excavator
02-14-2011, 05:38 PM
Hello Webpacks,
It's not an h1 at all really, it's a div with a class="h1" ... there's a difference.

In your style.css, line 29 -
.h1{
height:60px;
font-weight:normal;
width: 600px;
color: #895D12;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
;
font-size: 1.5em;
line-height: 1.5em;
text-align: right;
}


///edit: I'm looking in the wrong place. Not enough cofffee yet...

Excavator
02-14-2011, 05:43 PM
Ahh, I see, I'm sorry...

If you remove the #header .logo h1 from your CSS, then the h1 that is still in your markup has default styles that do not go away.

You would need to remove the <h1> from the markup as well.

Webpacks
02-14-2011, 05:49 PM
Ahh, I see, I'm sorry...

If you remove the #header .logo h1 from your CSS, then the h1 that is still in your markup has default styles that do not go away.

You would need to remove the <h1> from the markup as well.

@Excavator...yes sorry I meant I want to remove the logo h1 class from the logo image, I dont want to remove the .H1 stylle from the CSS.

The link to the site is: http://www.smartfencing.co.uk

Many thanks

Boz :)

Excavator
02-14-2011, 06:24 PM
@Excavator...yes sorry I meant I want to remove the logo h1 class from the logo image, I dont want to remove the .H1 stylle from the CSS.

Yes, you've already found the 2 entries in your CSS that style that h1. Like I said, when you remove those entries, the default styling for an h1 will still affect your logo image. That's what I meant when I said you would need to remove the h1 from your markup as well, so it looks something like this -
<div class="container"> <div class="logo"> <a href='http://www.smartfencing.co.uk/'">Smart Fencing Services 01273 446544</a></div></div>

Excavator
02-14-2011, 06:30 PM
You could put just the image in .logo, instead of a link.
Like this -
<div class="container"> <div class="logo"><img src="images/logo.jpg" alt="logo" /></div></div>

And some CSS
#header .logo {
width:289px;
height:99px;
}

Webpacks
02-14-2011, 07:21 PM
You could put just the image in .logo, instead of a link.
Like this -
<div class="container"> <div class="logo"><img src="images/logo.jpg" alt="logo" /></div></div>

And some CSS
#header .logo {
width:289px;
height:99px;
}

Hi Excavator...hey thats great ;-)

Thanks so much for your help!

Boz :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum