0

我试图让我的 div 在 IE 中正确浮动。它们在 Chrome 和 Firefox 中看起来很棒,但 IE 会破坏代码。您可以在这里看到 jsfiddle:http: //jsfiddle.net/vlyandra/kEm3R/基本上,图像 div 没有与条目 div 水平对齐,并且底部的表格(尽管有最大宽度)没有调整大小. 生成帖子的代码如下:

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="bordered centered">
    <p class="negative-margin alignleft header"><?php the_title(); ?></p><p class="negative-margin alignright date"><?php the_date(); ?></p><div style="clear:both;"></div>
    <?php if ( is_search() ) : // Only display Excerpts for Search ?>
        <div class="entry-summary">
            <?php the_excerpt(); ?>
        </div><!-- .entry-summary -->
    <?php else : ?>
        <div class="entry-content negative-margin">
            <?php if ( has_post_thumbnail() ):?>
            <div id="entry-left">
                <?php   $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large');
                echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
                echo get_the_post_thumbnail($post->ID, 'large'); 
                echo '</a>';?>
            </div>
            <div class="entry-right">
                <?php the_content( __( 'More <span class="meta-nav">&rarr;</span>', 'huckleberry' ) ); ?>
                <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'huckleberry' ), 'after' => '</div>' ) ); ?>
            </div><div style="clear:both;"></div>
            <div class="entry-right">
                <table class="fixed-height fixed-width">
                    <tr>
                        <td class="valigned"><h3 class="date">Details</h3>
                            <?php the_field('details');?>
                        </td>
                        <td class="valigned">
                            <a href="<?php echo MultiPostThumbnails::get_post_thumbnail_url(get_post_type(), 'secondary-image');?>">
                                <?php if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image'); endif; ?>
                            </a>
                        </td>
                        <td class="valigned">
                            <a href="<?php echo MultiPostThumbnails::get_post_thumbnail_url(get_post_type(), 'tertiary-image');?>">
                                <?php if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'tertiary-image'); endif; ?>
                            </a>
                        </td>
                        <td class="valigned">
                            <a href="<?php echo MultiPostThumbnails::get_post_thumbnail_url(get_post_type(), 'fourth-image');?>">
                                <?php if (class_exists('MultiPostThumbnails')) : MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'fourth-image'); endif; ?>
                            </a>
                        </td>
                    </tr>
                </table>
            </div>
            <?php else : ?>
                <?php the_content( __( 'More <span class="meta-nav">&rarr;</span>', 'huckleberry' ) ); ?>
                <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'huckleberry' ), 'after' => '</div>' ) ); ?>
        </div>
            <?php endif; ?>
    <?php endif; ?>

任何帮助将不胜感激!

4

1 回答 1

0

我没有看到它。您可以发送指向您网站的链接吗?

另外,您是否尝试过将 .alignleft 应用于图像?

于 2013-02-18T21:09:26.817 回答