Get exclusive CAP network offers from top brands

View CAP Offers

Cross Browser design?

gravity asked 4 years ago
My site looks good(at leat to me) in IE, how do I get my site to display properly in Firefox and Netscape? I cant seem to figure it out. Thanks-
6 Answers
EmeraldAce.com answered 4 years ago
Well, there are quite a few things you could/should do. First of all you need to add a doctype. Without one things get a bit weird…

You are also putting in a CSS into a <.p.> tag, which is a bad idea. Add a link to the stylesheet instead in the header.

You are using IE only tags like bordercolor and you are nesting code improperly which is probably causing al kinds of issues.

You also leave img tags open instead of closing them with the /> that is required and there are almost no alt tags with any image.

When validating this page using the HTML 4.01 Transitional doctype you end up with 134 errors and that is never a good idea <span title=” title=”” class=”bbcode_smiley” />

I suggest you head over to w3c and check the errors and then start cleaning up the code a bit and you’ll see things will look better crossbrowser after that: http://validator.w3.org/

If you need any help, just howl <span title=” title=”” class=”bbcode_smiley” />

gravity answered 4 years ago
Thanks for the info. I didnt realize that I had so many errors. Down to 124. Thanks again.

EmeraldAce.com answered 4 years ago
Its not that many when you look at them and they are pretty easy to correct. Just go over them one by one and you’ll soon have things cleared <span title=” title=”” class=”bbcode_smiley” />

casinowahine answered 4 years ago
Good tool EmeraldAce – thanks. I never would have known that I needed a doctype. So you have to make sure you add that to the beginning of each page you make, right?

EmeraldAce.com answered 4 years ago
That you should. Here is an example of a webpage first lines of code:
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
< head>
< meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />[/CODE]

In this I have set the doctype to be XHTML transitional, which is what I recommend if you are putting tables in your design, but want to be as much up to standards as possible. If you get frustrated with the weird errors and want a more loose doctype you can use html 4.01 transitional instead.

After doctype I add a declaration of language which makes it easier for searchengines to know where to put the website and how to interpret it.

After that I set a charset, which in this case uses the european charset as I will have swedish characters on the website. For strict english website you should use UTF-8 instead.[CODE]< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
< head>
< meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />[/CODE]

In this I have set the doctype to be XHTML transitional, which is what I recommend if you are putting tables in your design, but want to be as much up to standards as possible. If you get frustrated with the weird errors and want a more loose doctype you can use html 4.01 transitional instead.

After doctype I add a declaration of language which makes it easier for searchengines to know where to put the website and how to interpret it.

After that I set a charset, which in this case uses the european charset as I will have swedish characters on the website. For strict english website you should use UTF-8 instead.

jagan answered 4 years ago
These are nice tips and suggestions. use of maximum CSS or tablesless webdesign can be extra advantage for you