WordPress.org

Ready to get started?Download WordPress

Forums

Inactive img src (9 posts)

  1. p3mtl
    Member
    Posted 2 years ago #

    Hi,

    Can anyone see where i might have gone wrong with this code:

    [broken code moderated - please follow the forum guidelines for posting code]

    I'm trying to get the images to hyperlink to websites.

    Thanks

  2. alchymyth
    Forum Moderator
    Posted 2 years ago #

    please re-post your code -

    without being marked with the 'code' button, codes can get corrupted by the forum software.

  3. p3mtl
    Member
    Posted 2 years ago #

    Oops,

    <body <?php body_class(); ?>>
    <div id="page" class="hfeed">
    
    <div id="header_wrapper" style="width:1000px; height:123px; background:#F4F4F4 !important;">
    <div id="header_left" style="margin-left:40px; width:435px;float:left;">
    <a href="http://www.point3.com" target="_blank"><img src="/images/p3293.png" width="293" height="118" /></a>
    
    </div>
    
    <div id="header_right" style="width:525px; float:left; ">
    
    <div style="text-align:right; margin-right:15px; margin-top:15px; font-size:11px; float:right; clear:both;">
    <a href="http://www.facebook.com/p3montreal" target="_blank"><img src="/images/social/fb.jpg" width="29px" height="29px" style="margin-right:10px;" /></a><a href="http://www.twitter.com/point3montreal" target="_blank"><img src="/images/social/twitter.jpg" width="29px" height="29px" style="margin-right:10px;" /></a><a href="http://www.flickr.com/point3" target="_blank"><img src="/images/social/flickr.jpg" width="29px" height="29px" /></a></div>
    <div style="float:right; margin-top:40px; clear:both; margin-right:15px;"><?php do_action('icl_language_selector'); ?></div>
    <div id="page" class="hfeed">
  4. alchymyth
    Forum Moderator
    Posted 2 years ago #

    without error description, a guess: using relative image paths might be the problem;

    assuming that the images are in the /images folder of your theme,
    try to change from:
    <img src="/images/p3293.png" ......

    to:
    <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/p3293.png" .....

    http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

    and analogous for the other images.

    or try use absolute image urls.

  5. codingpet
    Member
    Posted 2 years ago #

    You are using relative image path that I think they are incorrect. src="/images/p3293.png" Is the image in your theme image folder? If yes, you may try src="<?php bloginfo('template_url'); ?>/images/p3293.png" to make sure the image path is correct.

  6. p3mtl
    Member
    Posted 2 years ago #

    The image paths are correct and show on the website, it's more that they don't link to the relevant places.

    Any ideas?

  7. alchymyth
    Forum Moderator
    Posted 2 years ago #

    it's more that they don't link to the relevant places.

    do they link at all?
    where do they link to?

    if they don't link, then this might be a formatting issue with layers.

    can you post a live link to your site with the problem?

  8. p3mtl
    Member
    Posted 2 years ago #

    http://www.point3.com/

    This is the website. I'm trying to link the Point3 image to the home page. The Facebook logo to our FB page and Twitter to our twitter account. I thought the code to do that was:

    <a href="http://www.facebook.com/p3montreal" target="_blank"><img src="/images/social/fb.jpg" width="29px" height="29px" style="margin-right:10px;" />

    But it doesn't seem to be working.

  9. codingpet
    Member
    Posted 2 years ago #

    style.css line 530. Find
    #branding {
    border-top: 0 none;
    padding-bottom: 10px;
    position: relative;
    z-index: 2;
    }

    change z-index: 2; to z-index: -100; -100 can be other numbers as long as it's less than 0.

Topic Closed

This topic has been closed to new replies.

About this Topic