Internet Explorer固定位置无法正常工作

时间:2012-01-06 05:22:25

标签: css wordpress internet-explorer validation css-position

我的导航栏和推文框无法正常显示。这些是固定的。如果您看到它们位于页面底部。他们不应该在哪里。

在我的网站的其他页面上,这两个元素即使在IE中也能正常工作。我的主页页面和页脚与我的其他页面有不同的页眉和页脚,所以我试图查明问题,但即使我除去导航条和推文框之外的所有代码,似乎问题仍然存在,真的很困惑我。

我很难过,现在看不清楚。我只是想在脸上打IE,但我知道这可能是我最近做过或改变过的事情,因为这并没有发生。

同样似乎也在同一时间受到影响,我猜相关的是,当你点击登录链接时,现在从顶部图像和登录表单部分分离。同样,这只发生在我的主页上,但在这种情况下使用登录表单,它也会显示在Chrome中。

任何人都可以帮我确定这里的问题,这样我就可以继续我的生活。 (我正在使用IE8进行测试)

谢谢!

EDIT ----------

我从下面的答案中注意到,我的身体标签不知何故。但是这里是我的代码,它显然不在我的body标签内,并且是代码中的第一行。当然,除了这个页面是一个自定义的wordpress模板,我在顶部有模板名称。标签似乎是空的,我的所有头部声明也在体内。很奇怪....有没有人知道为什么会这样。它似乎在所有浏览器上。我的整个页面代码如下。

<?php
/*
Template Name: Home Page
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0     Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">     
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">     <title><?php bp_page_title(); ?></title>  <?php do_action( 'bp_head' ); ?>
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />        <?php if ( function_exists( 'bp_sitewide_activity_feed_link' ) ) : ?>           <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php _e('Site Wide Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_sitewide_activity_feed_link() ?>" />     <?php endif; ?>     <?php if ( function_exists( 'bp_member_activity_feed_link' ) && bp_is_member() ) : ?>           <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_displayed_user_fullname() ?> | <?php _e( 'Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_member_activity_feed_link() ?>" />        <?php endif; ?>     <?php if ( function_exists( 'bp_group_activity_feed_link' ) && bp_is_group() ) : ?>         <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_current_group_name() ?> | <?php _e( 'Group Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_group_activity_feed_link() ?>" />        <?php endif; ?>     <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts RSS Feed', 'buddypress' ) ?>" href="<?php bloginfo('rss2_url'); ?>" />     <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts Atom Feed', 'buddypress' ) ?>" href="<?php bloginfo('atom_url'); ?>" />       <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />       

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21029219-7']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<!-- script for glossary highlight -->
<script type="text/javascript" src="https://www.aapltrader.com/wp-content/themes/Equilibrium/js/highlight.js"> </script>


<script type='text/javascript'>

// Browser safe opacity handling function

function setOpacity( value ) {
 document.getElementById("styled_popup").style.opacity = value / 10;
 document.getElementById("styled_popup").style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function fadeInMyPopup() {
 for( var i = 0 ; i <= 100 ; i++ )
   setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
}

function fadeOutMyPopup() {
 for( var i = 0 ; i <= 100 ; i++ ) {
   setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );
 }

 setTimeout('closeMyPopup()', 800 );
}

function closeMyPopup() {
 document.getElementById("styled_popup").style.display = "none"
}

function fireMyLoginPopup() {
 setOpacity( 0 );
 document.getElementById("styled_popup").style.display = "block";
 fadeInMyPopup();
}
function fireMyStockChartPopup() {
 setOpacity( 0 );
 document.getElementById("stockChart").style.display = "block";
 fadeInMyPopup();
}
</script>
<?php wp_head(); ?>

    </head>



    <body>

<div id='styled_popup' name='styled_popup' style='width: 380px; height: 300px; display:none; position: absolute; top: 50px; left: 50px; zoom: 1'>
<table width='380' cellpadding='0' cellspacing='0' border='0'>
<tr>

<td height='38' class='login-top'><a class="login-close" href='javascript:fadeOutMyPopup();'>X</a></td>
</tr>

<tr><td colspan='2' style='background-color: #686868; width: 380px; height: 200px;-moz-border-radius:  15px 0 15px 15px;
border-radius: 15px 0  15px 15px;'>

<form name="loginform" id="loginform" action="http://www.aapltrader.com/wp-login.php" method="post">

            <p class="login-username">
                <label for="user_login">Username</label>
                <input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" />
            </p>
            <p class="login-password">
                <label for="user_pass">Password</label>
                <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" />
            </p>
            <a class="login-forgot" href="http://www.aapltrader.com/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a>
            <p class="login-remember"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p>
            <p class="login-submit">
                <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" tabindex="100" />
                <input type="hidden" name="redirect_to" value="http://www.aapltrader.com/activity/" />
            </p>

        </form>



</td></tr>
</table>
</div>



<div id="container-sales">
  <div id="top-sales">
        <!-- <h1 class="logo"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1> -->
        <a style="padding-left:0px;" href="<?php bloginfo('home'); ?>"><img src="https://www.aapltrader.com/wp-content/uploads/2011/08/aapltraderlogo.gif"/></a>    
        </div>
    <div id="sales-background">
    <div id="page-wrap-sales">



<?php //get_header(); ?>

<div id="featured"> 



<div class="clear"></div>

<div id="front-bottom">
<div id="leftCol">

<span class="welcomeH2">Learn</span> <span class="welcomeTip">from Successful Traders </span>
<ul>
<li><span class="welcomeText">Tap a global network of AAPLTraders and expand your own trading style!</span></li>
</ul>

<span class="welcomeH2">Connect</span><span class="welcomeTip"> to a Community</span>
<ul>
<li><span class="welcomeText">Share ideas in the AAPLTrader Community Room. Refine your ideas through active groups.</span></li>
</ul>

<span class="welcomeH2">Grow</span><span class="welcomeTip"> Profits</span>
<ul>
<li><span class="welcomeText">Find out what strategies are currently profiting. Get AAPL Alerts during the week and stay plugged in.</span></li>
</ul>
<a href="https://www.aapltrader.com/checkout-2?subscription=2&claim=49d393ce7e1346fa24cecd5d0eb1533d" class="green-button">Get AAPLTrader</a>
<ul style="margin:0 0 0 0;padding:0 0 0 0;">
<li><span  style="font-size:1.5em;padding:10px 0px 0 88px;"> Premium Access  </span><span style="font-size:1.2em;color:#575958;">   $19.99/month</span></li>
<br /><br />
<li> <span style="font-size: 1.4em;color: white;padding: 0px 0px 0 80px;font-weight: bold;">30 Day Money Back Guarantee </span></li>
</ul>
</div>



<div id="sales-video">




 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="530" height="400" id="csSWF">
                <param name="movie" value="http://www.howtousethinkorswim.com/media/appletrader/justmetus/media/player.swf" />
                <param name="quality" value="best" />
                <param name="wmode" value="transparent" />
                <param name="bgcolor" value="#1a1a1a" />
                <param name="allowfullscreen" value="true" />
                <param name="scale" value="showall" />
                <param name="allowscriptaccess" value="always" />
                <param name="flashvars" value="thumb=http://www.howtousethinkorswim.com/media/appletrader/justmetus/media/FirstFrame.png&containerwidth=530&containerheight=400&content=justmetus.mp4&autostart=false&blurover=false&autohide=true&smoothing=true&showbranding=false&showstartscreen=true&color=0x1A1A1A,0x1A1A1A" />
                <!--[if !IE]-->
                <object type="application/x-shockwave-flash" data="http://www.howtousethinkorswim.com/media/appletrader/justmetus/media/player.swf" width="530" height="400">
                    <param name="quality" value="best" />
                    <param name="wmode" value="transparent" />
                    <param name="bgcolor" value="#1a1a1a" />
                    <param name="allowfullscreen" value="true" />
                    <param name="scale" value="showall" />
                    <param name="allowscriptaccess" value="always" />
                    <param name="flashvars" value="thumb=http://www.howtousethinkorswim.com/media/appletrader/justmetus/media/FirstFrame.png&containerwidth=530&containerheight=400&content=justmetus.mp4&autostart=false&blurover=false&autohide=true&smoothing=true&showbranding=false&showstartscreen=true&color=0x1A1A1A,0x1A1A1A" />
                <!--![endif]-->

                <!--[if !IE]-->
                </object>
                <!--![endif]-->
            </object>



</div>






 <div class="clear"></div>

 </div>


 </div>
<div class="clear"></div>

<div id="latest-wrap">

<div class="content-sales">

<h2 >How it works?</h2> <br /> 

<span class="content-sales-p"> AAPLTrader is a social networking website similar to facebook. We give people a place where they can connect with other like minded people who trade and invest.</span>  
<br /><br /> <br />
<span class="content-sales-p"> Members get access to:</span>
<ul style="font-size:1.4em;"><li style="list-style:disc outside none"><a href="http//www.aapltrader.com/what-is-aapltrader#alerts">AAPL Alerts</a></li>
<li style="list-style:disc outside none;"><a href="http//www.aapltrader.com/what-is-aapltrader#video-update">Video Updates </a></li>
<li style="list-style:disc outside none;"><a href="http//www.aapltrader.com/what-is-aapltrader#community">Community Room</a></li>
<li style="list-style:disc outside none;"><a href="http//www.aapltrader.com/what-is-aapltrader#groups">Groups</a></li> </ul>
<br /> <br />
<span class="content-sales-p">What makes AAPLTrader different are the AAPL Alerts and the Video Updates posted by the AAPLTrader Team on our exclusive wall. To get access, simply click the Get AAPLTrader Button or <a href="http://www.aapltrader.com/what-is-aapltrader">click here</a> for more info.</span>
</div>



<div id="testimonial">
<h2>Testimonials</h2>
<img style="float:left;margin:0 15px 10px 0;" src="<?php bloginfo('template_directory'); ?>/images/quotes.gif" title=" testimonial quotes" />
<p><strong>"First of all I love your advice and analysis. So happy I found it. Its helping me to another level.
 I have been in the market for 30 plus years. I have been doing phenomenal."</strong><br /> <br /><span style="float:right;"> -Paul F. California </span></p>
<div class="clear"></div>
<span id="motto"> "The Facebook for Stock Traders." </span><br/><p> <span style="float: right;"> -Lisa T. New York</span></p>
 </div> 
 <div class="clear"></div>

<div class="push"></div>




</div> <!--Latest Wrap -->




</div> <!--Page Wrap--> 
</div> <!--Sales Background-->  
</div> <!--Container Sales-->
<div class="clear"></div>



<?php do_action( 'bp_after_container' ) ?>
        <?php do_action( 'bp_before_footer' ) ?>


<div id="footer-home">
  <div align="center">
<div class="footer-posts">
<?php
$args = array( 'numberposts' => 3 , 'category' => 4 );
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post); ?>
    <div class="footer-post">
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    <?php the_excerpt(); ?>
</div>
<?php endforeach; ?>
</div> <!-- /footer-posts -->
<div class="clear"></div>

          AAPLTrader &copy; 2011 All Rights Reserved. AAPLTrader does not have any association with Apple Inc. <br /><a href="http://www.aapltrader.com/privacy-policy">Privacy Policy</a> | <a href="http://www.aapltrader.com/house-rules">House Rules</a> | <a href="http://www.aapltrader.com/terms-of-use">Terms Of Use</a> | <a href="http://www.aapltrader.com/cancellation-policy">Cancellation Policy</a> | <a href="http://www.aapltrader.com/disclaimer">Disclaimer</a> | <a href="http://www.aapltrader.com/wp-content/uploads/2010/06/riskstoc.pdf"> Risk of Stocks, Options, Commodities </a><br />

<?php if ( is_user_logged_in() ) { ?> <a href="http://www.aapltrader.com/affiliate-member"> Affiliate Information </a>  |<?php } else { ?><a href="http://www.aapltrader.com/affiliates-info"> Affiliate Information </a>  |<?php  } ?> 

 <a href="http://www.aapltrader.com/contact-us"> Contact Us </a></div>
        <p class="floatRight"></p>
        <div class="push"></div>

<?php do_action( 'bp_footer' ) ?>
</div>


<?php wp_footer(); ?>
<?php do_action( 'bp_after_footer' ) ?>

    </body>

</html>  

2 个答案:

答案 0 :(得分:3)

在IE中,您需要为固定位置添加适当的文档类型才能工作。

修改:出于某种原因,您的doctype定义不在第一行。见下面的快照,

DOCTYPE

答案 1 :(得分:1)

您正在使用xhtml进行编码,xhtml旨在在每个浏览器中正确显示,这当然是假设您的xhtml代码通过了验证,而不是。 Firefox很聪明,应该找到问题并为你修复它,IE不是。确保您的xhtml通过验证,然后重试。

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.aapltrader.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0