1

jQuery is cross browser, so it abstract JavaScript.

Is there any library for CSS that cross browser, so if I write for Mozilla Firefox, it will show nicely on any other browser, even older version of ie5, 6 ?

Shiladitya
  • 12,003
  • 15
  • 25
  • 38
cometta
  • 35,071
  • 77
  • 215
  • 324
  • 1
    I think the tags "javascript" and "jquery" are not relevant here. – MartyIX Jul 10 '10 at 08:53
  • I'm not sure, if the OP means ‘library’ that can only be JavaScript. There's not really such a thing as a CSS library, as CSS is only a bunch of declarative rules. You couldn't use CSS to automatically patch up problems in other CSS. You *could* use JavaScript to check the declared rules in `document.styleSheets`, see how the browser is rendering it (`offsetWidth` et al), and attempt to fix problems. I don't think it's a sensible thing to do, but you could do it. – bobince Jul 10 '10 at 09:28
  • 1
    I ran into [IE7.js](http://code.google.com/p/ie7-js/), which claims to fix a fair amount of IE bugs. I haven't used it though, so I don't know if it's of any use to you. – Niels van der Rest Jul 15 '10 at 15:21

5 Answers5

3

Maybe these two will help:

EDIT: Your question is duplicate of: Cross-browser CSS

Community
  • 1
  • 1
MartyIX
  • 27,828
  • 29
  • 136
  • 207
1

Check out Frame, a pretty damn good cross-browser CSS framework:

http://frame.serverboy.net/

mattbasta
  • 13,492
  • 9
  • 47
  • 68
1

I have used the 960 Grid system for my last few projects. I highly recommend.

redsquare
  • 78,161
  • 20
  • 151
  • 159
1

I don't think it's technically feasible to create a (javascript) library that can analyze an entire CSS file and modifies it on the fly to make it work in other browsers, because it would have to:

  • simulate Firefox' rendering to know what the page should look like,
  • know about all the rendering quirks of other browsers,
  • know which change to apply to which style rule to fix the design, which implies it should also have to simulate the rendering of other browsers to validate the fix.

jQuery 'only' has to deal with small aspects of a page's rendering. But making an entire design cross-browser compatible is in a league of its own.

Using CSS resets and frameworks, as the other answers suggested, will help a lot in realizing a cross-browser design. But there's no magic library that will fix your entire design in all browsers. And if there is, I'd love to know about it!

Niels van der Rest
  • 31,664
  • 16
  • 80
  • 86
0

I usually use 960, but a lot of times, like with Wordpress it's too time consuming to implement. A lot of times I'll use a javascript browser hack:

http://rafael.adm.br/css_browser_selector/

MrMaksimize
  • 542
  • 1
  • 6
  • 20