Writing for different browsers

  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

How does one go about designing pages that work (more or less :? ) in all browsers? Do you include all code for all types of browsers in one site, or write separate pages for different browsers? If so, how do you direct a given browser to the appropriate page?

It seems that one would want to write first for IE, as it is the dominant browser. However, netscape, opera, and other browsers are common enough I would think one would not want to ignore them.

Mark
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

As long as you write your code to the HTML 4.01 specifications and use CSS1 it should display fine in virtually all modern browsers (even Netscape 4 in most cases). There will be some subtle differences in how the various browsers display the pages, but not too far off.

A good reference for valid code is the W3 Schools http://www.w3schools.com . Of course the definitive resource would be the specification itself, http://www.w3.org/TR/html4/ , but it can be a little heavy reading.

Also check out the HTML Tidy and the HTML Validator links on the home page. http://www.w3.org - both very handy tools for validating cleaning up your code.

Last tip is get your hands on several browsers and versions and review your work in all of them. That way you know exactly how each browser displays your work.
  • conorific
  • Proficient
  • Proficient
  • User avatar
  • Posts: 350
  • Loc: NY

Post 3+ Months Ago

I highly recommend tables. They're a pain, but they work, and display content the best across browsers. Divs work too...but not as well, there are some properties that aren't supported and such.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

conorific wrote:
I highly recommend tables. They're a pain, but they work, and display content the best across browsers. Divs work too...but not as well, there are some properties that aren't supported and such.


I have to take the reverse position. Agreed tables work, but the current HTML specifications dictate that tables should not be used for presentation. You should use style instead. Now the first thing that most are going to say is no way can you structure a website without using tables. Take a look at the World Wide Web Consortium's home page: http://w3.org

Those of us who have been designing awhile would look at that and try to see what they did with the tables for their design, because that's simply what we're used to using. However, take a look at the source code. You won't find a single table in there! "Impossible", you say? Nope -- that's simply how it should be done.

Now admittedly, I'm so used to tables, that it's going to take some study and experimenting to get away from them, but I do like to stay current with the recommended specifications.

Tables have other downsides. IE is the only browser that will begin to display a page as soon as it has enough information to do so, whether it includes tables or not. However, Mozilla-based browsers such as Netscape are not so user friendly. If Netscape identifies tables in the document, it essentially parses the entire page in order to identify table structure before it will display the contents. That is the primary reason, I think, that IE "overlooks" a lot of coding errors that Mozilla browsers do not. I've seen entire pages fail to display in Netscape because the designer screwed up his table structure but they displayed just fine in IE.

Anyway, that's my 2-cents on this subject.
  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

Quote:
I have to take the reverse position. Agreed tables work, but the current HTML specifications dictate that tables should not be used for presentation. You should use style instead. Now the first thing that most are going to say is no way can you structure a website without using tables. Take a look at the World Wide Web Consortium's home page: http://w3.org



As I learn more about designing pages, I've come to understand that CSS is used to divide the style issues and content from the actual HTML file. The little bit of CSS that I've learned has been about setting fonts, colors, link properties, what not. Is there a link or tutorial that explains how one uses CSS to lay out the page? I know theoretically that CSS is supposed to do it, but I don't have the first idea on how to start.

Mark
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

This is VERY heavy reading, but here's how:

http://www.w3.org/TR/REC-CSS2/visuren.html

Trust me, I still don't understand it all, yet.
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

There is no magic bullet. Stick with the standards, especially now that Microsoft and Netscape have agreed to follow them more closely. I spent a lot of time working on indestructable pages and concluded that you need to generate your pages on the fly after sniffing the browser. This is a heck of a lot of work... seperating the content from the presentation and using a user-agent sniff to render a page. Blah!

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 57 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.