当前位置: 动力学知识库 > 问答 > 编程问答 >

css - Responsive HTML not reacting as expected in different browsers

问题描述:

So I am making a website but some weird thing is happening.

Like, you can see it happen by yourself, it's pretty staight forward; try opening this link into Chrome and Firefox (for example).

Chrome reacting just fine, and not Firefox.

As the two files are pretty long, I pasted those in pastebin:

  • header.php (which is called in my index): http://pastebin.com/E7P9y7Dt
  • style.css: http://pastebin.com/AxHQQJya

Can someone please help?

Thank you in advance.

Solid

网友答案:

Css properties you are using works differently on different browser.

i checked the page found issue specific with logo css

use display: inline-block; instead of display: table-cell;

finally your logo css should be

.logo {
    display: inline-block;
    padding: 5px 0;
    vertical-align: middle;
    width: 140px;
}

at line number 153

网友答案:

Obviously vikrams solution worked. If you really need to display it as a table-cell for some reason, you can also solve it to declare properties inside the element like this.

<div class="logo">

    <a title="ArtiTrans" href="index.html">
        <img alt="ArtiTrans" src="images/logo.png" width="100%" height="100%"></img>
    </a>

</div>
分享给朋友:
您可能感兴趣的文章:
随机阅读: