简体   繁体   中英

HTML - Website looks correct in IE but bugs in Chrome?

You can find the website here .

On Chrome: The icons jump some pixels randomly when you hover over them, the languages bar is way too low...

On IE: Looks and works correctly.

Here's only the most important of the CSS

CSS:

#main
{
    position: relative;
    overflow: hidden;
}

#varjo {
box-shadow: 5px 5px 10px gray;
}

.panel
{
    position: relative;
}

/* Me */

    #me
    {
    }

        #me .pic
        {
            position: relative;
            display: block;
            border-left: 1px #E1E1E1 solid;
        }

            /*
                The pseudo element below applies a noise pattern to the "me" image. It's
                meant to help mask blurriness, but you can remove it if you don't like it.
            */



            #me .pic:before
            {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                background: url('images/overlay.png');
                width: 100%;
                opacity: 0.5;
                height: 100%;
                z-index: 1;
            }

    #lang
{
background: black;
opacity: 0.7;
width: 95%;
font-family: Poiret One;
transition: 0.5s opacity;
cursor: default;
position: fixed:
}

::selection {
color: green;
}

#lang:hover{
opacity: 1;
}

    #lang a
    {
        position: relative;
        display: inline-block;
        color: #fff;
        width: 1em;
        width: 10%;
        height: 1em;
        line-height: 0.9em;
        margin-right: 150px;
        transition: 0.2s color;
        white-space:nowrap;
    }

    #lang a:hover {
    color: lightgreen;
    }

        #lang a.icon:before
        {
            padding-right: 0;
        }
#nav
{
margin-top: 20px;
}

    #nav a
    {
        position: relative;
        display: inline-block;
        color: #fff;
        width: 1em;
        height: 1em;
        line-height: 0.9em;
    }

        #nav a.icon:before
        {
            padding-right: 0;
        }

    .fa
{
    text-decoration: none;
    transition: all 0.5s;
}

    .fa.solo
    {
    }

        .fa.solo span
        {
            display: none;
        }

    .fa:before
    {
        display:inline-block;
        font-family: FontAwesome;
        font-size: 1.25em;
        text-decoration: none;
        font-style: normal;
        font-weight: normal;
        line-height: 1;
        -webkit-font-smoothing:antialiased;
        -moz-osx-font-smoothing:grayscale;
    }

You can see the HTML in the Source Code :)

Chrome:

铬

IE:

IE

I think I'm using the most recent version of both, IE and Chrome. Please help, thank you :)

Seems that the vertical-align of your content is causing that...

1920 X 1080 Screen - Chrome

在此处输入图片说明

1280 X 800 Screen - Chrome

在此处输入图片说明

As you can see depending on the screen's size the spacing will change - (take a look for your scroll bar)

You can also add some margin-top: in your #nav element. Something like:

#nav {
   margin-top: 30px;
}

Other important change on your site is that you have set opacity: 0 in your #nav .fa-film span . Opacity 0 allows to show when you're hovering (and I guess that you only need to show that tooltip when user hover the icons). It's more useful set that span as display: none and then change your #nav a:hover span to

#nav a:hover span {
  display: inherit;
}

Add body {margin:0px; padding:0px;} body {margin:0px; padding:0px;} to your CSS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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