Enjoy an ad free experience by logging in. Not a member yet?
Register .
02-14-2011, 04:13 PM
PM User |
#1
New Coder
Join Date: Sep 2009
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Remove H1 tag from logo div
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:
PHP Code:
<div class="container"> <div class="logo"><h1 onclick="location.href='<?php echo get_option ( 'home' ); ?> /'"><?php bloginfo ( 'name' ); ?> </h1></div></div>
Code:
#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
Boz
Last edited by Webpacks; 02-14-2011 at 06:28 PM ..
Reason: RESOLVED: remove link and add code
02-14-2011, 04:34 PM
PM User |
#2
Supreme Master coder!
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
Can we have a link to your page?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
02-14-2011, 04:38 PM
PM User |
#3
Master Coder
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
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 -
Code:
.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...
Last edited by Excavator; 02-14-2011 at 04:45 PM ..
02-14-2011, 04:43 PM
PM User |
#4
Master Coder
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
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.
02-14-2011, 04:49 PM
PM User |
#5
New Coder
Join Date: Sep 2009
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
Excavator
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
02-14-2011, 05:24 PM
PM User |
#6
Master Coder
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Quote:
Originally Posted by
Webpacks
@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 -
Code:
<div class="container"> <div class="logo"> <a href='http://www.smartfencing.co.uk/'">Smart Fencing Services 01273 446544</a></div></div>
02-14-2011, 05:30 PM
PM User |
#7
Master Coder
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
You could put just the image in .logo, instead of a link.
Like this -
Code:
<div class="container"> <div class="logo"><img src="images/logo.jpg" alt="logo" /></div></div>
And some CSS
Code:
#header .logo {
width:289px;
height:99px;
}
Users who have thanked Excavator for this post:
02-14-2011, 06:21 PM
PM User |
#8
New Coder
Join Date: Sep 2009
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by
Excavator
You could put just the image in .logo, instead of a link.
Like this -
Code:
<div class="container"> <div class="logo"><img src="images/logo.jpg" alt="logo" /></div></div>
And some CSS
Code:
#header .logo {
width:289px;
height:99px;
}
Hi Excavator...hey thats great ;-)
Thanks so much for your help!
Boz
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 10:51 AM .
Advertisement
Log in to turn off these ads.