0

Internet Explorer 让我很难受。我制作了一个 WordPress 主题,并使其大部分与 IE 兼容,除了帖子底部的表格。该表溢出了它所在的容器 div 的一侧,并且在 IE 中似乎也太大了。(应该是 430 x 200 像素)你可以在这里看到 JSFiddle:http: //jsfiddle.net/vlyandra/kEm3R/

用于生成每个帖子的 Wordpress 主题代码如下所示:

<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; ?>

我对 IE 很糟糕,希望能得到任何帮助。

4

2 回答 2

0

您是否尝试过以下...

margin:0px auto; or
left:0; right:0;
于 2013-02-17T19:35:37.300 回答
0

您已将其所在的 div 设置为正确的尺寸,并且不希望它从该 div 溢出...

那么设置

CSS:

tblid{
width : 100%;
length : 100%;
}

不确定上面是否是正确的css格式

于 2013-02-17T20:07:23.807 回答