Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #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

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,851
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Can we have a link to your page?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 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.
    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

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 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.
    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

  • #5
    New Coder
    Join Date
    Sep 2009
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 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;
    }
    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

  • Users who have thanked Excavator for this post:

    Webpacks (02-14-2011)

  • #8
    New Coder
    Join Date
    Sep 2009
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •