![]() ![]() |
Star MemberGroup: Members
Joined: 18-December 03
Posts: 596
From: Tempe, AZ
|
Sep 19 2004, 03:03 PM |
|
|
Hi Mike,
This is a great question. When you first start to plan for your website there are two main things you should decide 1) What browsers to I need to comply with. Making pages that truely consider ALL browsers would leave us with: No tables, No javascript, No CSS, no Frames (Don't use these anyway) and definitely No Flash. We can even say no images since the very first browsers did not display images and there are those who use text readers. Obviously this is not the way to go, we have to make sites that are appealing to the majority audience while still taking the minority into account. So you have a choice, what browsers will you target? My answer: I try to make well structured documents first, then add styling in after. CSS is the answer for this. If you want to maximize browser compatability you should fist focus on the structure of the document. This will enusre that even with no stylesheet the pages reads logically and it means that those with text browsers will understand your page. 2) How 'consistant' is consistant? You need to decide what varience you will tollerate in how your page displays in various browsers. It might be difficult if not impossible to achieve pixel-perfect design across all browsers. My answer: For older browsers, content is more important than style. Users of older browsers must be used to pages not looking very 'sexy' like they do in modern sites. So as long as they can read the content they will be happy. Don't be too concerned with the like looking the same in all browsers. My rule is if 80% of the users won't notice something looks wrong - then leave it alone and move on. Here are some other basic things to consider: 1) Picking a DTD (Doctype Declairation:) Choosing the right doctype is very important. Browsers render pages differently. Newer browsers are in some cases extrememly different than older browsers as they have corrected errors in previous versions. You can order a browsers to render pages the old way (quirks mode) by selecting a 'transitional' doctype. More information on choosing the right doctype can be found here. 2) Choosing a target resolution: If people are using an older browser, than odds are they are using an older monitor. 640x480 was common on 15 inch monitors. 800x600 is common on 17 inch monitors. Picking a resolution is important to your visitors since if you create the page too wide you will force your users to scroll horizontally - which is no good. You can avoid this by trying to use a liquid layout which will resize the content to fit in whatever screen resolution the user has. Here is a good primer on liquid layouts 3) Create 100% valid sourcecode: Older browsers are not as forgiving as newer ones are. NN4 for example has a problem with open tables. If you forget the </table> tag, NN4 will go into a coma. Newer browsers can figure you forgot the tag and will put it in for you. So make sure you use start and end tags for everything <p></p>, <table></table>, <div></div>, etc. This is just good pratice. Also make sure you close every tag that does not have an ending tag, with a backslash. This means don't use <br> which will still work, but use <br /> or use <img src="myimage.gif" /> This is also just good practice and is the begging of your road to learning XHTML. You should run all pages through a validator 3) Colors: People using older browsers and most likely older monitors may be limited in the colors they can display. Now a days this is not much of a concern, but you might want to consider limited your color pallete to the web safe colors known as the 216 color pallete. The reason why there is 216 as opposed to 256 colors which you'd expect in an older 8 bit monitor is because while 8 bits gives you 256 colors available, only 216 of them are common across the Mac and Windows operating systems. Use the 216 pallete and you will be sure the colors are a similar as possible. These days a large majority of users are on a 24 bit "True Color" pallete. Just remember you nice color layout can turn into mud if viewed on an older monitor. It may or may not be an issue for you. You can find a Web Safe color chart here. 4) Creating Separate Stylesheets: You can create two stylesheets, one for NN4 and one for newer browsers. In between the <head> elements you can have the correct sheet load for the correct browsers by using the following: <link rel="stylesheet" href="nn4.css" type="text/css">/* This serves a sheet older browsers such as Netscape 4. */ <STYLE TYPE="text/css"> @import url(modern.css); /* hides 'advanced' styles from older browsers such as Netscape 4 */ </STYLE> Older browsers simply ignore the @import link. There are other various problems with CSS as each browser has it's own problems. A good list of the bugs you will find in browsers can be found here. 5) Images: Netscape 4 does not support transparency in .PNG files so avoid using those if you want to support older browsers. Stick to the .gif format. Also make sure you use the ALT attribute for your images and make sure they are logical. This ensure that text readers and those with images turned off can still understand the meaning of the images your using. If an images is simply a grahic or spacer with no relevance to the content, then at lest use a proper empty ALT tag. alt="" For everything you've ever wanted to know about the Alt attribute go here. 6) Choosing a Character Set: You might be familar with this line in your code: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> This is telling your browser what character set to use so it knows the proper letters and punctuation to display. Netscape 4 has some problems with non-latin characters so keep this in mind. A checklist for character encoding and the plateforms that support them can be found here 7) Javascript: These days most users have javascript available to them. Still there are a few who are using older browsers and a few more who surf with Javascript off. To accomodate these users make sure that there is no critical function that uses javascript only. For example, do not use only Javascript for links because if a use does not have javascript enabled, they will not be able to navigate your site. You can avoid this easily by using <noscript></noscript> tags and adding in content that users will see if they can not have javascript. The <noscript> defines alternate content to be used if the users browsers does not support whatever is in between the <script> tags. 8) Flash: If you must use flash, a good practice is to have an entry page that lets users choose Flash or No Flash versions of the site. Also, provide a 'skip into' link if you are dumping users into a flash splash page. One good tool for generating the script for embedding flash can be found here. **Note this is untested by me. Supposedly it helps generate clean embedding code and write the code that give users alerts there is flash on the site and provides the links to install the flash plug in automatically. Really a neat thing if it's functional. Well that's all I can squeeze out of my head. I'm curious to see what others come up with as this is an important topic Frank V. |
||
| Offline | ![]() |
Moderator Alumni![]() ![]() Group: Hall Of Fame
Joined: 14-November 02
Posts: 7,199
From: Los Angeles
|
Sep 20 2004, 05:39 AM |
|
|
What both Frank and Adrian said.
As to IE, perhaps this will help people to make up their minds. => The site is Dan Renner's ITdiaries.com blog; Dan is my client, but the data is valuable. |
||
| Offline | ![]() |
Moderator Alumni![]() ![]() Group: Hall Of Fame
Joined: 9-January 04
Posts: 3,094
From: Canberra, Australia
|
Sep 23 2004, 04:49 AM |
|
|
Frank's answer was quite thorough!
|
||
| Offline | ![]() |
Star Member![]() Group: Members
Joined: 13-August 04
Posts: 944
From: Derbyshire UK
|
Sep 23 2004, 07:52 AM |
|
|
lil mike, to be honest, the main thing I do to give my designs the best chance of working across different browsers (and I don't achieve perfection by any stretch) is: I do *simple* design.
I work in Photoshop first, but all the time I'm thinking about how what I do will be built. The benefit of being both the designer and producer! I'm really strict about simplicity. The kind of thing this might result in is: - Keeping overlapping to a minimum - Wherever possible, using CSS to provide colour, border styles, 3D effects - Sticking to classic layouts, with clearly defined screen areas - This is a good one - STEAL OTHER PEOPLE'S CODE, which already works (I don't do this enough!) There are no prizes for reinventing the wheel (see http://www.webdesignfromscratch.com/pursui...he_original.cfm for my philosophy on this) - In CSS, use separate elements for padding, because different browsers treat them differently. Avoid putting padding on an element whose width/height is fixed. Peace, Scratch |
||
| Offline | ![]() |
|
|
| Lo-Fi Version | Time is now: 9th September 2010 - 02:21 AM |
| Meet our Moderators: | cre8pc : Black Phoenix : bwelford : EGOL : Ruud : rustybrick : AbleReach : swainzy : joedolson: eKstreme: dazzlindonna : SEOigloo: iamlost : RisaBB |