开发者

css styling issue with safari and IE 8

开发者 https://www.devze.com 2023-01-24 05:08 出处:网络
I am using a css stylesheet in one of my web pages. The styles work perfect for Mozilla and IE 7 and below. However theres a problem with it in IE8 and safari.

I am using a css stylesheet in one of my web pages. The styles work perfect for Mozilla and IE 7 and below. However theres a problem with it in IE8 and safari.

The width of class in the css is 700px. I have used a contentplaceholder in the master p开发者_如何学编程age from where this web page inherits. Now in IE8 it displays a little less than 700px. I think it displays a width of 600px. How can I solve this problem? Is there a tool for IE 8 similar to Firebug?

EDITED: I have figured exactly where the problem is by debugging the page source and the css. I dont know how I can change the width and alignment for ONLY IE8

I have fixed it for IE8 but having issues with Mac Safari. Anyway to target ONLY safari?

Thanks


If it's a number of changes

<!--[if IE 8]>
    <link rel="stylesheet" type="text/css" href="ie8stylesheet.css" />
<![endif]-->

But if it's only one or two, you might just want to use embedded css

<!--[if IE 8]>
     <style type="text/css">
     css goes here.
     </style>
<![endif]-->

Either of these would go in the <head> section of your main page.


<!--[if IE 8]>
Add some different css here
<![endif]-->


You can burn in the fiery depths of IE hell messing around with Javascript and whatnot, or you can use some (just as bad) IE hacks.

Will targeting IE8 with conditional comments work?

0

精彩评论

暂无评论...
验证码 换一张
取 消