Background image problem - help please

Discussion in 'CSS' started by Eskarina, Feb 20, 2008.

  1. #1
    :)

    Hi,

    My sister has a new wordpress theme installed and all is ok except I can't fix it so that when you click on the background logo, it takes you to the homepage.

    Basically, can anyone help me fix it so that I can attach a link to a background image, without showing any link text ?

    Here's the site:

    http://www.dreamportugal.co.uk

    Thanks :p
     
    Eskarina, Feb 20, 2008 IP
  2. greboguru

    greboguru Member

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Hi,

    You can't attach a link to a background image.

    My advice would be not have the image as a background image but display it using 'img' tag. Any reason why it has to be a background image?
     
    greboguru, Feb 20, 2008 IP
    Eskarina likes this.
  3. kishore415

    kishore415 Well-Known Member

    Messages:
    1,462
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    160
    #3
    i dont exactly what you are asking ..but i think you want to make your logo as a link..the below code will help yoou if it is so..

    Use this...

    <A HREF="http://www.dreamportugal.co.uk">
    <IMG SRC="your logo">
    </A>
     
    kishore415, Feb 20, 2008 IP
  4. greboguru

    greboguru Member

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #4
    You could look at this thread for some more thoughts on logos on pages

    http://forums.digitalpoint.com/showthread.php?t=715355
     
    greboguru, Feb 20, 2008 IP
  5. princessa

    princessa Active Member

    Messages:
    761
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    70
    #5
    I don't get what you're asking. :confused:
    You want to make it a link, or you *don't* want it to be a link?
    You might have to post your header.php file from your theme, I'll be able to see what the problem is then! :D
     
    princessa, Feb 20, 2008 IP
  6. designexpert

    designexpert Guest

    Messages:
    196
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    the solution is fairly simple.....

    in the logo div id, add the following:

    #someid a
    {
    padding: 20px 40px;
    display: block;
    text-decoration: none;
    }
    then add this to your header inside the logo div: <a href="xyz.com"><span></span></a>

    i guess that should work
     
    designexpert, Feb 20, 2008 IP
    Eskarina likes this.
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    Wow - just... wow.
    	<div id="left">
    		<div id="right">
    			<div id="main">
    				<!--header -->
    				<div id="header">					
    					<div id="logo">
    						<h1><a href="http://dreamportugal.co.uk/central-portugal-property/" ></a></h1>
    Code (markup):
    Seven block level elements on a fluid layout website... Here's a tip, there is NO reason for that ENTIRE set of nesting to be more than JUST the h1. ALL of those DIV's serve no purpose and should be axed. Good rule of thumb - more than 3 'indents' when properly formatted before you hit anything resembling content - good indicator of doing something wrong.

    Of course this:
    <meta name="generator" content="WordPress 2.3.3" /> <!-- leave this for stats -->
    Code (markup):
    Explains 99.99% of the 'problem' - I swear does anyone who writes turdpress templates actually UNDERSTAND HTML and/or CSS? (Ok, I can think of ONE person)
     
    deathshadow, Feb 20, 2008 IP
    Eskarina likes this.
  8. Eskarina

    Eskarina Guest

    Messages:
    608
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #8
    LOL I KNOW ! :D I wondered what that was all about but I've never fiddled with a wordpress template before, it's not my site & I simply don't have time to start messing around with it too much. At the end of the day, it looks pretty :D and my sister wanted a site up double quick.

    I can get the logo on the left to work as a link to homepage but then it doesn't display the image on all the other pages :confused: I dunno, I'll figure it out when I have more time.

    Thanks very much for the suggestions guys.
     
    Eskarina, Feb 21, 2008 IP
  9. Eskarina

    Eskarina Guest

    Messages:
    608
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks for your help :) I tried that before I posted my question & it didn't work. I tried everything I could find on google & zilcho. I guess whoever said you can't attach a link to a background image was right :(
     
    Eskarina, Feb 21, 2008 IP
  10. Eskarina

    Eskarina Guest

    Messages:
    608
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thankyou greobguru, I did try that but it messed too many other things up & I haven't got time to redo the whole thing. I'll perhaps try again when I have more time.
     
    Eskarina, Feb 21, 2008 IP
  11. mkei

    mkei Guest

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    CSS:
    
    #logo a {
    	position: absolute;
    	display: block;
    	width: 380px;
    	height: 115px;
    	left: 0; top: 0;
    }
    Code (markup):
    HTML:
    
    <div id="logo">
    <a href="http://dreamportugal.co.uk/central-portugal-property/" title="Home"></a>
    </div>
    Code (markup):
     
    mkei, Feb 21, 2008 IP
    Eskarina likes this.
  12. designexpert

    designexpert Guest

    Messages:
    196
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #12

    you are misunderstanding the concept... the aim is to provide a background image ON AN EMPTY PADDED AREA[which can be made clickable]... like how you make the full tab of a horizontal menu "clickable"[even thought the tab is a background image]

    well with proper coding i think that should be possible...
     
    designexpert, Feb 21, 2008 IP
  13. Eskarina

    Eskarina Guest

    Messages:
    608
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #13
    :D:p COOL ... it worked, I did try something very similar but obviously fessed up on it :p A HUGE THANKYOU TO YOU mkei :)

    ------------------------------------------------------------------------
    Unfortunately we've encountered another problem today .... a very different problem and not css related but I hope it's ok to add to this post.

    Today my sister was editing a few of her posts in the wordpress admin area, everything was fine. Then a little later, all of her links on her menu have stopped working !! They are completely dead !

    Neither of us fiddled with any of the code. Has anyone an idea what may have caused this or even better.... how to fix it ?
     
    Eskarina, Feb 22, 2008 IP
  14. Eskarina

    Eskarina Guest

    Messages:
    608
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Yeah that's true ! I never thought of that. Thankfully mkei has solved the problem anyhow, but thanks for your help & suggestions :)

    Now then, if you could help with the weird new problem we have ........ :p
     
    Eskarina, Feb 22, 2008 IP
  15. designexpert

    designexpert Guest

    Messages:
    196
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #15
    sure just mention it here:)
     
    designexpert, Feb 22, 2008 IP
  16. Eskarina

    Eskarina Guest

    Messages:
    608
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #16
    :D I have posted it in the appropriate forum category now :p
     
    Eskarina, Feb 22, 2008 IP