【问题标题】:problem with Website alignment网站对齐问题
【发布时间】:2011-05-25 23:15:29
【问题描述】:

直到最近,我的网站一切正常且对齐正确。只是在某个时候,我集成了thickbox onload。从那时起,该特定页面的对齐方式就变得混乱了。请帮帮我。

请转至link供您参考

其他页面都很好,但是主页被扭曲了。请指教。

【问题讨论】:

  • “糟糕!谷歌浏览器无法连接到 school.roboshaala.com”你知道为什么吗?你能给我们看一些截图吗? :)
  • 我觉得没问题。你清除缓存了吗?
  • 现在查看 d 链接..它的工作..

标签: javascript html css web alignment


【解决方案1】:

你把厚盒 CSS 放在你的后面。

thcickbox css 中的第一行:

*{padding: 0; margin: 0;}

你的#main div 是如何居中的:

#main { background-color:; background-image: url('images/orange2.jpg')
    margin-right: auto;
    margin-left: auto;
}
body {background-color:;background-image: url('images/orange-20.jpg')} 
*{border: 0;margin-top: 0px;margin-bottom: 0px;}

margin: 0 auto 方法被取消,因为厚框 CSS。

2 个解决方案:

  1. 删除thickbox css的第一行
  2. 把你的 CSS 放在后面试试。

正如@livetolearn 所说,您使用width 居中的方法更好。

另一方面,您的 CSS 是高度可优化的。 例如,

background-color:; background-image: url('images/orange2.jpg')

=

background:url('images/orange2.jpg')

【讨论】:

    【解决方案2】:

    在你的css文件中替换这段代码

    #main {
    background-image: url("images/orange2.jpg");
    margin: 0 auto;
    width: 900px; // replace with your width
    }
    

    【讨论】:

      【解决方案3】:

      从我所在的位置看起来不错。 然而,在 FF 中,页面没有居中。是这个问题吗? 添加:

      #Table_01 { margin: 0 auto}
      

      您确实在 IE 中遇到脚本错误 出现“alerrt”拼写错误?

      <script type="text/javascript">
      
      function my_code(){
      alerrt(" 
      

      【讨论】:

        【解决方案4】:

        这些行在thickbox.css 中并且没有被正确覆盖。可能是这个原因

        * {
            margin-top: 0;
            margin-left: 0;
        }
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-12-25
          • 1970-01-01
          • 1970-01-01
          • 2021-05-26
          相关资源
          最近更新 更多