Styling a wordpress list.

Discussion in 'CSS' started by Germz, Jun 23, 2009.

  1. #1
    Ok so this is what I have for a sidebar in my wordpress index.php file, but the images that I created for li links are not showing up.

    <div id="navigator">
    			<ul id="nav">
    				<li><a class="home" href="##"><img src="
    <?php include (ABSPATH . '/wpthemes/wp-content/themes/HTML/images/home.gif'); ?>" width="28" height="13" alt="home" /></a></li>
    				<li><a class="sports" href="##"><img src="images/sports.gif" width="36" height="11" alt="sports" /></a></li>
    				<li><a class="about" href="##"><img src="images/about.gif" width="31" height="11" alt="about" /></a></li>
    				<li><a class="links" href="##"><img src="images/links.gif" width="27" height="12" alt="links" /></li>
    				<li><a class="wedding" href="##"><img src="images/wedding.gif" width="49" height="11" alt="weddings" /></a></li>
    				<li><a class="contact" href="##"><img src="images/contact.gif" width="59" height="12" alt="contact us" /></a></li>
    			</ul>
    		</div>
    HTML:
    As you can see I even tryed making the call on php on the home link and the image is still not showing up.
     
    Germz, Jun 23, 2009 IP
  2. Istvan

    Istvan Well-Known Member

    Messages:
    1,544
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    175
    #2
    try linking with wordpress code
    <img src="<?php bloginfo('template_url'); ?>/images/home.gif" />
    
    Code (markup):
    this is the url of the template
     
    Istvan, Jun 26, 2009 IP
  3. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #3
    When you load your page from the server check the source code and then put the link to the image in your navigation bar and check that it's pointing to the picture correctly.
     
    wd_2k6, Jun 26, 2009 IP
  4. Germz

    Germz Peon

    Messages:
    1,109
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I got it working, just direct linked it.
     
    Germz, Jun 29, 2009 IP
  5. justinlorder

    justinlorder Peon

    Messages:
    4,160
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Notice the image path should be relative with the style sheet(css file) path . ( In many occassions, they are such problems. )
    Compare the php template source and the html source (from browsers), you will find the problem .
     
    justinlorder, Jul 3, 2009 IP