Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Member #
    34202
    Hi

    I'm using wordpress, and a theme that uses video as the homepage background. I want to add an image to the homepage, that sits in the top left hand corner, which is promoting a music album which says 'buy now'. This is the code I'm using

    I've put this code in index.php :

    <div class="album"></div>

    Then in style_dark.php (css) added this code:

    .album a {
    position:fixed;
    index:99999999;
    left:12px;
    top:50px;
    display:block;
    width:300px;
    height:150px;
    background:url('buynow.png')0 0 no repeat;
    }
    .album a:hover
    opacity:.85;
    }
    The image is uploaded in the correct place on server. And when I view the website and scroll over the top left hand corner the hand cursor appears so it is obviously recognising something but the image does not show up.

    I've checked this code a thousand times and it works perfectly for another site I'm working on but not on this one.

    All my other images work fine so its not a timthumb issue

    URL: www.katieblount.com

    Anyone have any suggestions?

    ktlb

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Try Adding a z-index value to your div... Since you didn't post all CSS its hard to tell what's what of what might be keeping it from view.

    Depending on what is already there, you may need to give it a higher z-index value... The higher the value, the higher the div is set over other things...

  4. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Member #
    34202
    hi thanks for replying

    There is a z-index of 99999999 in the css, although above it says 'index' I meant to write 'z-index'. So in the css code it says

    z-index:99999999;

  5. #4
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Yeah, most browsers ignore a number that high.

    What else on the page has a z-index assigned ?

    You tube videos embeds are a weird one... I've seen z-indexes of 100 work ... Sometimes have to take it to , 100000, never much over that.

    Different browsers also handle the YouTube embed differently.

  6. #5
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Member #
    34202
    Hi

    Thanks for the reply. I've had a look and below is everything that includes a z-index in the css

    #content
    z-index:-888

    #bgImages{
    <?php $thCont = opt('thController','block');
    if($thCont=='none')
    echo 'z-index:-100;';
    else
    echo 'z-index:899;';
    ?>

    I also just tried changing the z-index to 100 then 1000 then 10000 but nothing has changed still can't see image.

  7. #6
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    In WP very often the index page is not actually the page that loads - the index page just calls the whichever template should be loaded for the page being viewed. Look for a file called home.php and put your PHP in there - see if that works.

    Or try putting your image on .album instead of on .album a

    Lots of times with WP it's trial and error with a theme until you figure out where and what to edit...
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  8. #7
    Junior Member
    Join Date
    Dec 2012
    Posts
    4
    Member #
    34202
    Hi

    Thanks very much for taking the time to answer. Unfortunately the theme does not have a home.php, the developers have used the index.php for the home page. This theme is set up differently to other themes, i think because it uses a youtube video on the background. I've also had a look in index.php and that is where the images and divs etc are for the home page.

    I've also already tried changing .album a to .album and still no luck

    Its probably a really simple answer its just knowing what to look for, but i don't have much experience with wordpress or PHP.

    If anyone has any other ideas I'd love to hear them

    Thanks again

    ktlb

  9. #8
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    I wish i could help you more -
    The developer for that theme has a support forum HERE - you might get a better answer there.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:23 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com