WordPress.org

Ready to get started?Download WordPress

Forums

Background image into a link (16 posts)

  1. pipevel
    Member
    Posted 2 years ago #

    Hello guys!

    I have a little problem,

    This css:

    #header {
    background: url(http://urbancoach.es/wp-content/uploads/2012/logo.jpg) top left;
    display:block;
    background-repeat: no-repeat;
    height:70px;
    width:300px;
    margin-left: 100px;
    }

    This header.php:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    I have to convert my header into a link to: http://urbancoach.es/

    Thanks for the collaboration!!

    ;)

    Love to be part of a community!!

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    in style.css:

    remove this line:

    #header h1, #header h2 {display: none;}

    add these lines:

    #header h1, #header h2 {text-indent: -9999px; margin-left: 0; }
    #header h1 a { display:block; width: 300px; height: 60px; }

    after this line:

    #header h1{ position:relative; float:left; margin:0px 0px 0px 250px; width: 650px; padding:0px; font-family:arial; font-weight:bold; font-size:20px; text-transform:uppercase;}
  3. pipevel
    Member
    Posted 2 years ago #

    Hello!!

    Thanks for your collaboration!

    It didnt worked, i need to convert the image into a link to the home of my website,,,

    ;(

  4. potentweb
    Member
    Posted 2 years ago #

    You can't add hyperlinks with CSS. Your either going to have to add a mask over the #header div using z-index and link that or your going to have to use jQuery / JavaScript to add a click action to the #header div.

  5. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    alternatively, you could edit header.php and re-code the section to add a normal image with the link, and remove the background image from the styles.

  6. IfeanyiG
    Member
    Posted 2 years ago #

    Please i also have a background problem, i dont know how to put a customized background on my blog....www.waohnaija.com

    I dont know what to put or change in my codes, i have opened topics on this forum, but noone has replied...HELP!!

  7. IfeanyiG
    Member
    Posted 2 years ago #

    /* The Outer cover */

    #wrapper {

    margin:0px auto;
    position:relative;
    width:1000px;
    background:url(images/wrap.png);
    }

    #topribbon{
    background:url(images/topribon.jpg) top center no-repeat;
    margin-top:0px;

    }

    #casing {
    padding:0px 0px 10px 0px;
    margin:0px auto;

    }

  8. potentweb
    Member
    Posted 2 years ago #

    @IfeanyiG tried to visit your site. It set off McAffee warning.

  9. IfeanyiG
    Member
    Posted 2 years ago #

    @potentweb...whats the warning message....Your the first person that has ever experience that..i run Karpesky antivirus and also have plugins installed on my blog, no other person has had this problem...Ijust opened it now, no problem

  10. potentweb
    Member
    Posted 2 years ago #

    The site advisor went off saying it could be potentially unsafe.

  11. IfeanyiG
    Member
    Posted 2 years ago #

    @potentweb...Thanks for noticing, i just registed with the site advisor to know why it had a warning yellowsign for my website, because i am registered with some other site health websites that havent flagged my website...Please can you help with my problem?

  12. potentweb
    Member
    Posted 2 years ago #

    Your background image for the site is on the body in your CSS. If you want the main site's background image changed, change the image url on the body. FYI, you have alot of things that don't belong inside the body tag in between the body tag. Your title and meta info should be in between the head tag.

  13. IfeanyiG
    Member
    Posted 2 years ago #

    Please i dont really understand most of the techie things..What are the things that dont belong??, are they harmful??...so i should simply upload and image and change the url right?

  14. potentweb
    Member
    Posted 2 years ago #

    Yes change the image url for the body in your CSS.

  15. IfeanyiG
    Member
    Posted 2 years ago #

    I just did this, and it didnt work,it even affected my main blog look, took away the white colour

    /* The Outer cover */

    #wrapper {

    margin:0px auto;
    position:relative;
    width:1000px;
    background:url(http://waohnaija.com/public_html/wp-content/uploads/);
    }

  16. potentweb
    Member
    Posted 2 years ago #

    The body element on your CSS NOT the #wrapper.

Topic Closed

This topic has been closed to new replies.

About this Topic