跨浏览器兼容性-需要帮助 [英] cross browser compatabilty - need help

查看:96
本文介绍了跨浏览器兼容性-需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,请帮我弄清楚.
我正在为页面工作设计一个简单的标题,并且在IE 9,8 firefox上得到的结果是不同的:请查看以下内容:

hi guys please help me figure this out .
im designing a simple header to a page work on, and the result i get on IE 9,8 firefox is different check this out :

<div id="setSpace">
    <table width="100%" border="2" id="sms_form_header">
    <tr>
    <td align="left"><h1>SWS - SMS Winning Solution</h1></td>
    <td align="left" valign="bottom" dir="rtl"><b><font color="red"><?php echo $_GET['credits']; ?></font></b></td>
    <td align="right" dir="rtl" valign="bottom">יתרת הודעות :</td><td></td>
    <td align="left" valign="bottom" dir="rtl"><b><font color="red"><?php echo $_GET['user']; ?></font></b></td>
    <td align="right" dir="rtl" valign="bottom">שלום,</td>
    </tr>
    </table>
    </div>



现在,我在代码所示的表中的单独文件中添加了一些CSS样式,但我认为这不是导致问题的原因. 例如,在IE9中,我看不到表格边框,并且

标签不起作用,而在Firefox中,我在工作区中看到的外观类似100%.

正如您所见,我是新来的.请指导我.

摩西



now, i added some css styles in a seperate file to the table shown in the code, but i don''t think that''s what causing the problem .
for example, in IE9 i dont see the table borders, and

tags are not working, while in firefox the desing i see in my workspace is similar 100% .

im new as you can see . please guide me.

moses

推荐答案

_GET ['credits']; ? > < > /b < > < td =" 右" dir rtl" valign =" 底部" < /td > < td > < > < td =" 左" valign 底部" dir =" rtl" < b > < =" 红色" <? php 回声
_GET['credits']; ?></font></b></td> <td align="right" dir="rtl" valign="bottom">יתרת הודעות :</td><td></td> <td align="left" valign="bottom" dir="rtl"><b><font color="red"><?php echo


_GET ['user']; ? > /font < /b > < /td > < td =" 右" dir rtl" valign =" 底部" < /td > < /tr > < /table > < /div >
_GET['user']; ?></font></b></td> <td align="right" dir="rtl" valign="bottom">שלום,</td> </tr> </table> </div>



现在,我在代码所示的表中的单独文件中添加了一些CSS样式,但我认为这不是导致问题的原因. 例如,在IE9中,我看不到表格边框,并且

标签不起作用,而在Firefox中,我在工作区中看到的外观类似100%.

正如您所见,我是新手.请指导我.

摩西



now, i added some css styles in a seperate file to the table shown in the code, but i don''t think that''s what causing the problem .
for example, in IE9 i dont see the table borders, and

tags are not working, while in firefox the desing i see in my workspace is similar 100% .

im new as you can see . please guide me.

moses


我不知道您的边框,对齐方式和类似属性中的哪一个会造成跨浏览器兼容性的损失.我可以告诉你原因:我从不使用它们.使用这样的属性确实是一件坏事.我什至不知道谁使用它们开发网站. 真正的 Web开发人员中可能没有一个.

样式和特定于演示的格式应与内容分开;这样做的技术方法是使用CSS. OK,您说,您使用它.我无法从您的代码中看到它.即使将某些CSS样式应用于代码,这还不够.您还应该停止使用在代码示例中使用的属性. 只需删除所有内容,不使用任何内容,在某些情况下,使用属性class.

是的,跨浏览器兼容性是一个真正的问题,但是您要实现的边界和对齐方式太简单了.这样简单的渲染通常不是CSS的问题.您没有什么特别的需要知道的.只需获取CSS标准文本和/或一本不错的参考书,然后学习使用这些样式即可. 那要比谈论它们更有效.没有更好的方法.

祝你好运,
—SA
I have no idea which of your border, alignment and similar attributes create the loss in cross-browser compatibility. I can tell you why: I never use them. Using such attributes is really a bad thing. I don''t even know who develop Web sites using them. Probably none of real Web developers.

Styles and presentation-specific formatting should be separated from the content as much as possible; and the technical way of doing it is using CSS. OK, you say, you use it. I cannot see it from your code. And even if you apply some CSS style to your code, this is not enough. You also should stop using attributes you are using in your code sample. Just remove then all, use none of them, and, in some cases, use the attribute class.

Yes, cross-browser compatibility is a real problem, but the borders and alignment you are trying to achieve is way too simple. Such simple rendering usually is not a problem with CSS. There is nothing special you need to know; just grab a text of CSS standard and/or a good reference book and learn using those styles. It would be much more effective then talking about them. There is no a better way.

Good luck,
—SA


这篇关于跨浏览器兼容性-需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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