【问题标题】:form aligned to right表格右对齐
【发布时间】:2012-08-19 17:33:07
【问题描述】:

我的问题是我使用下面的代码作为注册表单。它在 Firefox 和 Google Chrome 中运行良好。但是当我使用 Internet Explorer 时,整个页面都与左对齐。我已经检查了 CSS,但它没有问题。请帮我解决这个问题:

<!-- checking the session -->
    <% 
    try{    
    %>
    <%@ include file="checksession.jsp"%>
    <%
    }
    catch(Exception e){
    %>
    <jsp:forward page="session.jsp" />
    <%
    }
    %>

    <%@page import="cls.dateconverter"%>
    <%@include file="includePade/connection.jsp"%>

    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="css_inside/reset.css" rel="stylesheet" type="text/css" />
    <link href="css_inside/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/marquee.js">
    </script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> 
    <script src="script/ajax_admin.js" type="text/javascript"></script> 
    <!---------(For Combo Box)---end------->
    </head>
    <body>
    <div class="top-band">
      <div class="signinband" style="width: 100%">
      <div class="sms">
      </div><!--sms-->
        <div class="sign-in-box" Style="width:600px;text-align: right;" ><p>
    <ul>
        <li><a href="#"></a></li>
        <li><a href="#">Home</a></li>
        <li><a href="#">Contact Us</a></li>
        <li><a href="#">About Us</a></li>
        <li style="border:none;"><a href="logout.jsp">Log Out</a></li>
      </ul>
        </div><!--sign-in-box-->
      </div><!--signinband-->
    </div><!--top-band-->
    <div class="container_12 wrapper" style="margin: auto;">
    <div class="grid_12 inner">
    <div class="clear"></div>
      <div class="grid_12 inner">
        <div class="grid_12 footer-info alpha">
    <p>This is city based free classified website that help people buy,sell,rent,lease. You can post free ads and reply to ads on web or direct in the city you live in.</p></div><!--footer-info-->
        <div class="grid_12 futer alpha">
        <ul>

          <li><a href="#">Home</a></li>
          <li class="slash">|</li>
          <li><a href="#">Contact Us</a></li>
          <li class="slash">|</li>

          <li><a href="#">privacy policy</a></li>
          <li class="slash">|</li>
          <li><a href="#">Term of Use</a></li>
          <li class="slash">|</li>
          <li><a href="#">Careers</a></li>
          <li class="slash">|</li>

          <li><a href="#">Help</a></li>
          </ul>
        </div><!--futer-->
        <div class="grid_12 futer alpha" style="text-align:center">
       Copyright &#169; 2012 <a href="index.jsp">myclient.com </a>. All rights reserved  
         </div><!--futer-->
      </div><!--inner-->
      </div>
    </div><!--wrapper-->
    </body>
    </html>

【问题讨论】:

  • style.css 和表单在哪里?
  • 我已经检查了 style.css。它的CSS很长。这就是为什么我不发布它。
  • 我认为您没有发布完整的代码。如果您需要这里的任何帮助,请执行此操作。尝试删除每个 div 并检查它,如果你想检查 div 使用“firebug for IE”或“Microsoft Internet Explorer Developer Toolbar”(getfirebug.com/firebuglite,或microsoft.com/en-us/download/details.aspx?id=18359

标签: html css internet-explorer jsp alignment


【解决方案1】:

尝试删除第一行“检查会话”中的注释。一旦我在 IE7 中遇到同样的问题。希望它能解决这个问题。不确定您的情况,请尝试发布完整代码。

【讨论】:

  • 感谢您的回答。如果我删除评论时工作正常
  • 不客气。从下次开始,请具体说明问题。
猜你喜欢
  • 1970-01-01
  • 2011-10-26
  • 1970-01-01
  • 2017-03-07
  • 2011-04-09
  • 1970-01-01
  • 1970-01-01
  • 2011-10-16
  • 1970-01-01
相关资源
最近更新 更多