简体   繁体   English

在Safari中,我的图像不会漂浮在我段落的左侧

[英]How come in Safari my image won't float to the left of my paragraph

My website loads fine in Chrome, but in Safari my image won't float to the left of my article. 我的网站在Chrome中可以正常加载,但在Safari中,我的图像不会浮在文章的左侧。 Here is a look at the CSS: 这里是CSS的外观:

body    {
    background-color:white;
    font-family: 'Josefin Slab', serif;
}

.top_portion    {
    width:820px;
    height:200px;
    background-color:#e2e2e2;
    margin:auto;
    text-align:center;
    border-top:5px;
    border-bottom:5px;
    border-left:0px;
    border-right:0px;
    border-style:solid;
    border-color:#30474b;
}

.top_portion    img     {
    padding-top:0px;
}

#welcome    h1  {
    margin-top:0px;
    text-align:center;
    padding:0px;
    margin-bottom:0px;
}

#welcome    h3  {
    margin:0px;
    text-align:center;
}

#welcome    {
    margin:auto;
    background-color:#e2e2e2;
    width:820px;
}

#navigation {
    text-align:center;
}

#navigation li  {
    list-style-type:none;
    display:inline;;
}

ul  {
    font-size:20px;
    margin:0;
}

ul a {
    padding-right:20px;
    text-decoration:none;
    color:black;
}

a:hover {
    color:#888eee;
    }

This is the div containing the image and the article 这是包含图片和文章的div

.info {
    width:820px;
    margin:auto;
    background-color:#e2e2e2;
    overflow:hidden;
}

Here is the image 这是图片

.info img { 
    padding-top:6px;
    padding-left:5px;
}

And here is the article this is and the .info img above should be next to each other but they aren't in Safari which has been updated to the latest version. 这是这篇文章,上面的.info img应该彼此相邻,但它们不在Safari中,后者已更新到最新版本。

article {
    padding-left:5px;
    font-family:sans-serif;
    text-indent:15px;
    width:600px;
    float:right;
    background-color:#e2e2e2;
    display:inline-block;
    text-align:justify;
}

article h2  {
    font-family: 'Carme', sans-serif;
    margin-top:5px;
}

h5  {
    padding:0;
    margin:0;
}

a   {
    color:black;
}

#bottomlink {
    font-size:1.5em;
    text-align:center;
}

#bottomlink a   {
    text-decoration:none;
}

float:left; 向左飘浮; for the img and don't bother float:right; 对于img,不要打扰float:right; on the article 在文章上

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM