Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-14-2011, 04:13 PM   PM User | #1
Webpacks
New Coder

 
Join Date: Sep 2009
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Webpacks is an unknown quantity at this point
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
Webpacks is offline   Reply With Quote
Old 02-14-2011, 04:34 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
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)
abduraooft is offline   Reply With Quote
Old 02-14-2011, 04:38 PM   PM User | #3
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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...
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

Last edited by Excavator; 02-14-2011 at 04:45 PM..
Excavator is offline   Reply With Quote
Old 02-14-2011, 04:43 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 02-14-2011, 04:49 PM   PM User | #5
Webpacks
New Coder

 
Join Date: Sep 2009
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Webpacks is an unknown quantity at this point
Quote:
Originally Posted by Excavator View Post
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
Webpacks is offline   Reply With Quote
Old 02-14-2011, 05:24 PM   PM User | #6
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by Webpacks View Post
@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>
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 02-14-2011, 05:30 PM   PM User | #7
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
Webpacks (02-14-2011)
Old 02-14-2011, 06:21 PM   PM User | #8
Webpacks
New Coder

 
Join Date: Sep 2009
Posts: 20
Thanks: 5
Thanked 0 Times in 0 Posts
Webpacks is an unknown quantity at this point
Quote:
Originally Posted by Excavator View Post
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
Webpacks is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:51 AM.


Advertisement
Log in to turn off these ads.