Forum Moderators: open

Message Too Old, No Replies

Difference amongst browsers?

         

Zerrlander

8:14 pm on Jun 20, 2006 (gmt 0)

10+ Year Member



Hi,

Which code should I be aware of when creating a site that's going to viewed amongst different browsers?

There's so many browsers being used these days ...

Thanks for your help!

Robin_reala

8:39 am on Jun 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The idea is not to code to specific browser implementations but to a set of defined standards all browsers can implement. First port of call is to make sure your HTML and CSS is valid [validator.w3.org], as valid code is generally far more cross browser compatible. Specific problems can then be dealt with.

Matt Probert

12:31 pm on Jun 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just stick to very simple HTML and, if you feel the need, simple CSS.

It's not just browsers that differ, but also viewports, monitors, eyes and human perception.

Matt

Zerrlander

4:08 pm on Jun 21, 2006 (gmt 0)

10+ Year Member



Yes, I've noticed in the past IE/Netscape days there were always differences in spacing tags, blank images, and such.

With so many browsers to choose from, I just want to make sure that I don't come across any weird strings of code that are or are not visible in certain browsers.

Thanks for your suggestions!

Robin_reala

1:06 pm on Jun 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's certainly a lot better than it ever used to be in terms of browser compatibility.

rocknbil

5:41 pm on Jun 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With so many browsers to choose from, I just want to make sure that I don't come across any weird strings of code that are or are not visible in certain browsers.

When in doubt, just find out if the code you intend to use is proprietary, that is, specific to a particular browser. For example, old school methods of

<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">

Were to appease NN and IE - only IE recognized leftmargin and topmargin, and only NN recognized marginheight and marginwidth, and both ignored the other. So whatever browser was viewing the page would always have some unrecognized unsupported attribute.

These are easily replaced in css and recognized by all modern browsers:
body { margin:0;padding:0; }
<body>