SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    418
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Captions Not Links

    How do I get the captions for these photos to not be links?
    I only want the viewer to click on images to enlarge, not the captions.

    <ul id="gallery">
    <li><a href="thumbs/with-camerasmallerthumb.jpg"><img src="images/with-camerasmaller.jpg" width="340" height="245"><font color="white">&nbsp;<i>Santa Fe, New Mexico</i></li>
    <li><a href="thumbs/IMG_2776smallerthumb.jpg"><img src="images/IMG_2776smaller.jpg" width="340" height="245"><font color="white"><i>St.Pee Nivelle, France</i></a></li>
    <li><a href="thumbs/P9100124thumb.jpg"><img src="images/P9100124.jpg" width="340" height="245"><font color="white"><i>Crater Lake, Oregon</i></a></li>

    <li><a href="thumbs/IMG_2442thumb.jpg"><img src="images/IMG_2442.jpg" width="340" height="245"><font color="white"><i>Beynac, France</i></a></li>
    <li><a href="thumbs/P9080054thumb.jpg"><img src="images/P9080054.jpg" width="340" height="245"><font color="white"><i>Oregon Coast</i></a></li>
    <li><a href="thumbs/luxembourgthumb.jpg"><img src="images/luxembourg.jpg" width="340" height="245"><font color="white"><i>Luxembourg Gardens, Paris</i></a></li>
    <li><a href="thumbs/faysanfranthumb.jpg"><img src="images/faysanfran.jpg" width="340" height="245"><font color="white"><i>San Francisco</i></a></li>
    <li><a href="thumbs/shootingthumb.jpg"><img src="images/shooting.jpg" width="340" height="245"><font color="white"><i>Loire Region, France</i></a></li>
    </ul>

  2. #2
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    You'll need to not include the text within the A tag, i.e.

    Code html4strict:
    <ul>
      <li>
        <a href="...">
          <img src="..." alt="">
        </a>
        Caption
      </li>
    </ul>

    Alternately, you can use a definition list:
    Code html4strict:
    <dl>
      <dt>
        <a href="...">
          <img src="..." alt="">
        </a>
      </dt>
        <dd>
          Caption
        </dd>
    </dl>

    You shouldn't use the FONT and I tags, but rather use CSS to style your text.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this should do it;


    <ul id="gallery">
    <li><a href="thumbs/with-camerasmallerthumb.jpg"><img src="images/with-camerasmaller.jpg" width="340" height="245"></a><font color="white">&nbsp;<i>Santa Fe, New Mexico</i></li>
    <li><a href="thumbs/IMG_2776smallerthumb.jpg"><img src="images/IMG_2776smaller.jpg" width="340" height="245"><font color="white"></a><i>St.Pee Nivelle, France</i></li>
    <li><a href="thumbs/P9100124thumb.jpg"><img src="images/P9100124.jpg" width="340" height="245"></a><font color="white"><i>Crater Lake, Oregon</i></li>

    <li><a href="thumbs/IMG_2442thumb.jpg"><img src="images/IMG_2442.jpg" width="340" height="245"><font color="white"></a><i>Beynac, France</i></li>
    <li><a href="thumbs/P9080054thumb.jpg"><img src="images/P9080054.jpg" width="340" height="245"><font color="white"></a><i>Oregon Coast</i></li>
    <li><a href="thumbs/luxembourgthumb.jpg"><img src="images/luxembourg.jpg" width="340" height="245"><font color="white"></a><i>Luxembourg Gardens, Paris</i></li>
    <li><a href="thumbs/faysanfranthumb.jpg"><img src="images/faysanfran.jpg" width="340" height="245"></a><font color="white"><i>San Francisco</i></li>
    <li><a href="thumbs/shootingthumb.jpg"><img src="images/shooting.jpg" width="340" height="245"></a><font color="white"><i>Loire Region, France</i></li>
    </ul>
    |
    Add Your Robotics site to my Robot Directory: submit
    |
    Add Your Las Vegas Website to my Las Vegas Directory: submit

  4. #4
    SitePoint Evangelist Barnum's Avatar
    Join Date
    Oct 2008
    Posts
    418
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys. Once again, looking over the text from my CC class, I should have known this, and guess I just forgot. Does one ever get comfortable writing all this stuff?

  5. #5
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will become comfortable spotting errors like that, easily, in no time if you stick with it.
    |
    Add Your Robotics site to my Robot Directory: submit
    |
    Add Your Las Vegas Website to my Las Vegas Directory: submit

  6. #6
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    I would also suggest that you spend some time indenting your code. This will make it much easier to spot many common errors.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •