不同浏览器的布局问题 [英] layout issue with different browsers

查看:138
本文介绍了不同浏览器的布局问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,该网站与FireFox完全兼容(台式机和Android版).但是当我切换到另一个浏览器时,问题不断出现.检查我的主页:

I have a website, that works totally fine with FireFox (both desktop and android versions). but when I switch to another browser, the problems keep popping. check my homepage:

http://pichak-gallery.com

页眉很好地放置在firefox中,但是当您在chrome中打开页面时,页眉不在其位置.所以我必须添加这个:

the header is well placed in firefox, but when you open the page in chrome,the header is not at its place. so I have to add this:

margin-top:-16px

但是这将破坏Firefox中的网站.我什至不说该网站在IE中已完全损坏.

but this will break the website in firefox. I don't even say that website is totally broken in IE.

另一个问题属于Google + 1按钮.不会显示在chrome中,直到按F12并打开inspect元素,然后按钮才会显示出来.

another problem belongs to Google+1 button. that doesnt show up in chrome,until you press F12 and open inspect elements, then the button will show itself.

例如在此页面中:

http://pichak-gallery.com/index .php/7-maincategory/5-gallery.html

这将发生:

我研究了很长时间的代码,以研究问题.但我在代码中找不到任何问题.

I worked on the codes for a long time, to investigate the problem. but I can't find any problem in the codes.

其他人有没有经历过这些?是否有代码或脚本可以解决这些问题?

Have anyone else experienced these? Is there a code or script to be able to fix these?

推荐答案

好的,我明白了.

第一个问题是由于java模板中的几行.以:

the 1st problem was because of a few lines from java template. starting with :

<?php
defined('_JEXEC') or die;

JHtml::_('behavior.framework', true);

$app = JFactory::getApplication();
?>

据我所知,这些行是出于安全原因,而且我认为它们不会对布局产生任何影响,因为它们不会回显任何内容.

as far as i know these lines are for some security reasons, and i didnt think they will have any effect on layout since they dont echo anything.

第二个问题是关于我添加到CSS中的自定义行的.我用!important标记手动覆盖了google + 1按钮的原始样式,这使某些浏览器出现问题.我必须将g + 1按钮放入DIV中,然后将这些样式添加到上述DIV中.

the 2nd problem was about the custom line i added into my css. i manually overrided the original styles of google+1 button with !important tags, which it made problem with some browser. i had to put g+1 button in a DIV, then add those style to the mentioned DIV.

这篇关于不同浏览器的布局问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆