Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- newbie: browser-independence
November 19, 2007, 8:14 am
rate this thread
Are there any rules, standards, documents describing making WWW pages
working correctly on all popular browsers (IE, Netscape, FireFox, Opera). I
have noticed that methods described in books do not work on all browser; for
instance I cannot achieve CSS hover/background-image effect on all browsers.
Thanks in advance.
Re: newbie: browser-independence
It all comes down to the meaning of your choice of wording: "correctly on
all popular browsers". By "correctly" do you mean "the same" or "well"? The
latter is achievable; the former is an unrealistic and generally
HTML and CSS generally work on the principle of graceful degradation. If
a browser doesn't understand a feature, then it will ignore it, and the
page should still work OK 99% of the time. Your example of CSS hover is a
good one: if the browser doesn't support it (and IE6 doesn't support CSS
hover properly), then the page is still perfectly readable, but it loses
a snazzy effect.
Just make sure that when you make use of an HTML feature (and particularly
CSS ones) you consider what will happen when it's not supported. For
example, if you have black text on a dark blue background, but load a white
background image over the top of the dark blue, you need to consider what
happens when the image isn't loaded (perhaps the visitor deliberately has
images disabled, or perhaps a network problem prevented the image from
loading): black text on a dark blue background -- unreadable!
Obviously, there are 1000s of potential things that could be unsupported,
but it doesn't take long to get a feel in your head for what are the most
important considerations at the time. For example, there are millions of
different things that could kill you, but when you're crossing a road, you
tend to focus on the traffic rather than worrying about skin cancer.
Back to "the same on all popular browsers". Generally speaking this is
unachievable, so don't bother. There are too many factors to consider, and
if you try to control them all and get it right, you'll end up bodging it
in the "unpopular browsers", which some people use for very good reasons.
In the mean time, I recommend taking the HTML tutorials from htmldog.com.
They are some of the best around -- better than most "teach yourself HTML"
books. If you prefer to learn from a book rather than a website, there is
a book called "XHTML & CSS" from the same author (Patrick Griffiths). I've
not read the book, but if it's anything like the website, it'll be good.
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 12 days, 17:56.]
USD/EUR Exchange Rate Graph
- » Are you a hardworking web designer that needs an easy way to boost profits?
- — Previous thread in » Webmaster Forum