Forums

Problem with showing thumbnail in IE. (6 posts)

  1. joakimkristoffersson
    Member
    Posted 1 year ago #

    Hello!

    On my main-page I´d like to show thumbnails besides the topics. I´ve found this code which works absolutely correct in Firefox and Google Chrome, but not in I.E.

    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<div id="bakgrund">
    		<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    <a href="<?php the_permalink() ?>" style="height:120px;" rel="bookmark" title="<?php the_title(); ?>"> <img style="float: left; height: 120px; border: 1px solid #000; margin: 0px 10px 0px 0px;" src="/wp-content/uploads<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>" alt="thumbnail" height="120px" /></a>

    As you se, the thumbnail loads from a custom field. The problem in I.E is that the thumbnails height is only a few px, instead of whats set in the "style" (120px)

    I´ve tried to figured this out, but I ca´nt come up whit anything that works.

    / Joakim

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    no guarantee, but try:

    ... alt="thumbnail" height="120" /></a>

    http://www.w3schools.com/tags/att_img_height.asp

  3. joakimkristoffersson
    Member
    Posted 1 year ago #

    I´ve tried to set the height to "120" instead of "120px", but it doesn´t change anything. I´ve also looked at the page source, and i looks ok.

    Suggestions?

  4. benfranklin
    Member
    Posted 1 year ago #

    I don't think you need to set the height in the link, unless you set it to "display: block" and want the link area wider than the images, but I might add a width dimension of 120px to the img style and check it again after removing it from the link.

  5. joakimkristoffersson
    Member
    Posted 1 year ago #

    I´m starting to get crazy! It doesn´t work either. I removed the height in the link-tag, and I added the width, but it won´t show the entire picture, only like the 6-7 first px of the image. From the top.

  6. joakimkristoffersson
    Member
    Posted 1 year ago #

    After hours of testing, I´ve noticed that if removing the "float"-tag in style, the whole img will be displayed. Only problem then is that the text I wan´t beside it, is located under it...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.