【问题标题】:Weird resizing in every browser except IE在除 IE 之外的所有浏览器中进行奇怪的大小调整
【发布时间】:2010-06-22 09:26:01
【问题描述】:

我一直在编写我的网站,它在 IE 8 中看起来很完美,但是当我在 Safafi、Chrome 和 Firefox 中查看它时。一切都莫名其妙地变小了。 如何让网页看起来像在 IE 8 浏览器中一样正常?

我的网站位于:http://www.jjosephs.byethost22.com/visibility/fixed/index_2.htm

我几天来一直在弄乱他的代码,试图让它在所有 4 种浏览器中都能正常工作。我已经粘贴了下面的 css 代码,也许 css 大师会跳出一些东西。


/* Eric Myers - CSS Reset v1.0 | 20080212 */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    vertical-align: baseline;
    background: transparent;
}
body {

    background-color: rgb(85,105,94);
    font-family:"Gill Sans MT", "Gill Sans", sans-serif;
    color:white;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}

/* remember to define focus styles! */
:focus {
    outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
    text-decoration: none;
}
del {
    text-decoration: line-through;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/*
      Created by Keith Donegan of Code-Sucks.com

      E-Mail: Keithdonegan@gmail.com

      You can do whatever you want with these layouts,
      but it would be greatly appreciated if you gave a link
      back to http://www.code-sucks.com

*/

* { padding: 0; margin: 0; }

#wrapper { 
 margin: 0 auto;
 width: 922px;
}

#leftcolumn {
 margin: 10px 0px 0px 0px;
 padding: 10px;
 height: 500px;
 width: 155px;
 float: left;
}
#content { 
 float: left;
 margin: 10px 0px 0px 0px;
 padding: 10px;
 height: 500px;
 width: 490px;
 display: inline;
 line-height:110%;
 font-family:"Gill Sans MT", "Gill Sans", sans-serif;
}
#rightcolumn { 
 margin: 10px 0px 0px 0px;
 padding: 10px;
 height: 500px;
 width: 155px;
 float: left;
 position: relative;
}


#background_gradient img{
    position:absolute;
    width:100%;
    left:0px;
    top:0px;
}

#background_logo img{
    position:absolute;
    left:-271px;
    top:-134px;
    z-index:-1;
    display:inline;
}

#coming_soon_img{
    position:absolute;
    top:0px;
    left:0px;
}

#logo_large{
    float:right;
}

#landing_text{
    clear:both;
}

#first_paragraph, #company_name, #street_address, .contact_short, #copyright{
    color:#ffffff;
}

#landing_text{
    font-size:15px;
    line-height:20px;
}

.colored_text{
    color:#bd9e00;
}

#first_paragraph{
    font-size:20.5px;
    font-weight:bold;
}

#first_paragraph span{
    font-weight:normal;
    font-style:italic;
}

#lower_half{
    margin-top:26px;
}

#tag_line{
    font-size:17px;
    float:left;
}


#call_to_action_button{
    float:right;
}

#company_name{
    font-size:13.5px;
}

#horizontal_line{
    margin-top:15px;
}

#footer_text{
    font-size:7.5px;
    font-family:arial, "Gill Sans MT", sans-serif;
    font-weight:bold;
}

#logo_micro, #address_details{
    float:left;
}

#address_details{
    margin-left:12.5px;
}

#contact_details{
    display:block;
    line-height:80%;
}

.specific_contact_details, .specific_contact_details a{
    color:#bd9e00;
}

#copyright{
    float:right;
    font-size:6.5px;
}
.other_landing_text{
    line-height:121.5%;
    color:#313031;
}

【问题讨论】:

  • 我相信其他人会加入进来,但作为旁注,不建议使用 px 字体大小。
  • 你太担心了。您可以控制基本布局和样式,而不是确切的字体或大小。也就是说,我看不出 FF 和 IE 的区别。

标签: css xhtml cross-browser


【解决方案1】:

确保它不是像在 IE8 上放大的那样,因为 font-size:7.5px; 应该非常小。

【讨论】:

  • 是的,我在 IE 上放大了 :-/。它在所有 3 个浏览器中都是相同的精美印刷品,所以我至少获得了跨浏览器的兼容性。将以一定的比例增加所有内容,看看我是否可以制作一个不会让我的用户失明的页面。
【解决方案2】:

在 IE7、Chrome、Safari、FF 中看起来很棒,除了透明的 .png 图像在 IE6 中不起作用。干得好!

【讨论】:

    猜你喜欢
    • 2015-02-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-30
    • 2020-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多