布局问题与不同的浏览器

布局问题与不同的浏览器

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

问题描述

我有一个网站,与FireFox(桌面和Android版本)完全合作。但是当我切换到另一个浏览器,问题不断弹出。检查我的主页:





这会发生:


我长时间从事代码研究,以调查问题。但在代码中找不到任何问题。

有没有其他人经历过这些?有没有一个代码或脚本能够解决这些问题?

解决方案

好的,现在我明白了。
$ b

第一个问题是因为java模板中有几行。从以下开始:

 <?php 
defined('_ JEXEC')or die;

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

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

据我所知,这些行是出于安全原因,我不认为他们会有因为他们没有回应任何东西。布局效果。

第二个问题是关于我添加到我的CSS自定义行。我使用!重要标签手动覆盖了google + 1按钮的原始样式,这使得某些浏览器出现问题。我不得不把g + 1按钮放在DIV中,然后把这些样式添加到提到的DIV中。

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

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

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

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.

for example in this page:

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

this will happen:

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?

解决方案

ok now i got it.

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.

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.

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

07-31 13:57