1

I know there are programs like dreamweaver but none of them has significant success when it comes to creating automatic cross browser compatible html and css codes.

I was wondering, is there a framework or program that i can use for creating more cross browser compatible HTML and CSS layout ?

Currently, i am using a virtual windows xp version running on vmware to check how web pages looks in IE6, and manually using Chrome, Firefox, Opera and Safari.

mirza
  • 5,685
  • 10
  • 43
  • 73

2 Answers2

5

What you want doesn't really exist as many have said. I do try to safe myself most of the hassle you describe by consciously using only things that have proven to be widely supported and with which I have good experiences. The perfect solution doesn't exist but here are a few things to consider that could make your life easier:

  • Use a css reset so all default browser styles are gone.
  • Force yourself to write HTML that validates against a doctype. Personally I use only XHTML 1.1 (which is very strict) but gives high compatibility in most browsers.
  • Use only fonts that are common and widely supported.
  • Limit your use of javascript to the absolutely necessary, and use jQuery where you can, as it will "often iron out differences for you". (suggested by Andrew Barber)

This way you'll end up with web sites that have a very high chance to be cross browser compatible

Community
  • 1
  • 1
Bazzz
  • 26,427
  • 12
  • 52
  • 69
  • 1
    Excellent information; better answer than my own! +1. I would also add: use jQuery for Javascript when you must (particularly with event handlers), as it will *often* iron out differences for you. YMMV with that part, of course. – Andrew Barber Jan 13 '12 at 12:26
2

There is no reliable, broadly applicable solution to this beyond testing, testing, testing. The issues are so complex that it's essentially impossible to build a tool that could do this for anything close to every possible difference between the browsers.

Incidentally; there is a tool called IETester that you can use to be able to run multiple, previous versions of IE.


EDIT: You (motto) and others have noted issues with IETester. While I have not experienced issues with it myself, that could very well be because I have simply not used it to help me with layouts that use things which happen to be buggy in IETester.

Comments below note that the Developer Toolbar in IE9 permits us to use the IE7/IE8 rendering engines. I would guess this to be a more reliable way to test layouts for those browsers, and I plan to begin using that instead, myself.

I will then likely keep using IETester just for assuring basic usability for IE6.

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
  • I know that tool but i compared that software with actual IE versions and turns out IETester isn't very successful as it promised. – mirza Jan 13 '12 at 12:14
  • @motto Really? Interesting. I've always wondered if that might be the case with some edge-cases. It's served me pretty well generally. Then again, I also no longer spend effort on IE6. – Andrew Barber Jan 13 '12 at 12:17
  • 1
    Spending effort on IE6 most of the time isn't an option, which i have liberty to choose unfortunately. But using multiple windows xp virtual machines with different IE versions is the best solution so far. Besides using F12 button and choosing different compatibility modes in developer toolbar is another option. It has support for IE7, IE8 theoretically – mirza Jan 13 '12 at 12:20
  • IETester can be very innaccurate in my experience. In the past, i've fixed a bug in IETester but when i checked in the actual browser it had not fixed the bug, and it had introduced a new bug! Personally, i use IE9 and use the developer tools to switch the rendering engine. i know this also has problems, but i trust MS to provide a more accurate legacy rendering than some third party (as it's in their interest to make it easy for devs) – WickyNilliams Jan 13 '12 at 12:25
  • The IE9 dev tools are actually "alright" and allow you to view pages as IE > 7. Can't swear by it's accuracy though but it seems to work well enough. IE9 is still balls though. – SpaceBeers Jan 13 '12 at 12:27
  • 1
    The most foolproof method is separate VMs with IE6,7,8,and 9. This guarantees that it's actually what the given browser version renders and not affected by other rendering engines; it can be a bit costly though (due to Windows licensing). – Piskvor left the building Jan 13 '12 at 13:43