| Web Design Lobby Forum for general web design issues not specific to scripting or graphics. |
10-05-2004, 08:16 PM
|
#1 (permalink)
|
|
Inactive
Join Date: 09-13-04
Posts: 10
Latest Blog: None
|
Netscape 4... cough..puke.. and getElementBy Id
Howdy pardners,
I've only made a handful of sites. I always stuck straight to html, css, and as little javascript as possible. I always used one size for my pages, based on 800 x 600.
Well, now I'm ready for a change. I'm making a new site. I've developed the pages with several style sheets that target different screen sizes. They all work great with different screen sizes-640 x 480 - 800 x 600 - 1034 x 768, etc. in IE6, Mozilla, Opera.
I'm using tables and plan to stick with tables for this site. I give each table and cell a class name and go to the style sheet to format the width of tables and cells. Each different screen size gets it's own style sheet.
When I give a table a class name to set the width, Netscape 4 doesn't recognize it. so it screws up.
Can somebody please tell me how to set the width of tables in Netscape 4 and IE4 while still being able to use the latest for newer browsers?
Can table and table cells be sized with JavaScript?
Will I have to make altogether separate pages for the old clunkers just using straight html?
I've considered making separate pages but don't know how to serve them up. I know how to detect different browsers but don't know how to serve different pages for the specific browsers.
Please help me.
Thanks for your input. I appreciate it a lot.
|
|
|
10-06-2004, 01:18 PM
|
#2 (permalink)
|
|
Moderator
Join Date: 10-13-03
Location: UK
Posts: 2,819
Latest Blog: None
|
You know how to detect old browsers using JavaScript? or a server-side language?
Anyway I suggest setting the HTML table cell sizes to your 800x600 settings to make this default size for any non-CSS browser. I figure if poeple are still using NN4 the have an old display system too!
|
|
|
10-07-2004, 08:23 PM
|
#3 (permalink)
|
|
Inactive
Join Date: 09-13-04
Posts: 10
Latest Blog: None
|
Thanks Jim,
Yes sir. i know how to detect browsers. I do have the default <td> widths set for 800 x 600.
What I don't know how to go about is serving the default straight html pages to NN4 while serving the CSS rich formats to new browsers.
Do I have to make two duplicate sites in separate directories, disallowing one CSS directory from robots? That's the only way I can figure but I don't want to get screwed up for cloaking.
All I want to do is legitimately serve the same exact content to old and new browsers.
The reason is I've made the site to adjust to three different screen sizes, selectable according to the visitor's browser. I detect the screen size with a script and then select the proper style sheet for that visitor and it works very nicely.
The trouble is NN4 and IE4 don't cooperate with the CSS.
How do I separate the default pages (for the old clunkers) from the dhtml pages? They won't work together, so I have to use two different files for each page.
|
|
|
10-09-2004, 10:22 AM
|
#4 (permalink)
|
|
Inactive
Join Date: 09-13-04
Posts: 10
Latest Blog: None
|
lazyJim,
If I set the the width of a cell like this <td width="400">, how can I use an external style sheet to overpower that.
I can't seem to use both. It seems like the only way to use a default size is to use two separate pages.
|
|
|
10-12-2004, 12:47 PM
|
#5 (permalink)
|
|
Inactive
Join Date: 07-13-04
Location: Albuquerque, New Mexico
Posts: 34
Latest Blog: None
|
Personally I would look at my logs to see how many people are even still using Netscape 4 or even IE 4 that matter. Save yourself the time and don't even worry about it unless it's decent percentage. Back in the day we had to write 2 different codes to get the same result in both browsers. Anyway just my look at it.
|
|
|
10-12-2004, 03:45 PM
|
#6 (permalink)
|
|
Inactive
Join Date: 09-13-04
Posts: 10
Latest Blog: None
|
The problem is I get 12 to 14 hits every week with NN4. Several with IE4. Even get a few with browser < NN4. Don't want to lose a potential customer because of browser disply.
nmgoodthing, What was your systen for writing and serving the separate pages?
|
|
|
10-13-2004, 10:45 AM
|
#7 (permalink)
|
|
Inactive
Join Date: 07-13-04
Location: Albuquerque, New Mexico
Posts: 34
Latest Blog: None
|
This script goes inbetween the <head> section.
This will detect if they are using IE4 or Nescapr$ and send them to the intended page
<script>
var browser_type=navigator.appName
var browser_version=parseInt(navigator.appVersion)
//if NS 6
if (browser_type=="Netscape"&&browser_version>=5)
window.location.replace("http://yournetscape4dversion.com")
//if IE 4+
else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
window.location.replace("http://yourexplorer4version.com")
//if NS4+
else if (browser_type=="Netscape"&&browser_version>=4)
window.location.replace("http://yournetscape4+version.com")
//Default goto page (NOT NS 4+ and NOT IE 4+)
else
window.location="http://yourCSSversion.com "
</script>
This is the only way I can see around it unless you use good old plain HTML and bag the CSS. You might want to try percentages in your tables instead of absolute pixels. I used to have to write in ASP that "if this browser then write the HTML this size and so on".
|
|
|
10-14-2004, 06:25 AM
|
#8 (permalink)
|
|
Inactive
Join Date: 02-23-04
Location: South UK
Posts: 60
Latest Blog: None
|
You can use "import", or media types, to hide CSS from Navigator 4. That's usually the best way to do it. Often, though, it's not worth the hassle. In the last year, my site has had 4 visitors with NN4. I catered for it in the beginning - and now there's little point, as usage is so low these days - and only ever going to drop.
|
|
|
10-14-2004, 10:22 AM
|
#9 (permalink)
|
|
Inactive
Join Date: 07-13-04
Location: Albuquerque, New Mexico
Posts: 34
Latest Blog: None
|
Quote:
|
Originally Posted by ILoveJackDaniels
You can use "import", or media types, to hide CSS from Navigator 4. That's usually the best way to do it. Often, though, it's not worth the hassle. In the last year, my site has had 4 visitors with NN4. I catered for it in the beginning - and now there's little point, as usage is so low these days - and only ever going to drop.
|
My point exactly. Get with the times and technology people. Browsers are free.
|
|
|
10-15-2004, 03:36 AM
|
#10 (permalink)
|
|
Inactive
Join Date: 02-23-04
Location: South UK
Posts: 60
Latest Blog: None
|
Quote:
|
My point exactly. Get with the times and technology people.
|
Close, I think, but no cigar.
My point was that it's not worth catering to NN4 - for my site. If the stats change and people visit with NN4, I'll take a little more time to make sure the site is usable with NN4.
If your site has visitors using NN4, make sure the site is usable for them. Hide advanced styling by all means, but do check it works.
As an aside - one of the other projects I am currently involved with shows a significant number of customers using version 3 browsers and before. That means I have to make sure the site degrades well for those people. Your stats should drive you - don't waste time on work that is unnecessary, and don't be lazy when a little graceful degradation is required.
|
|
|
10-15-2004, 02:07 PM
|
#11 (permalink)
|
|
Moderator
Join Date: 10-13-03
Location: UK
Posts: 2,819
Latest Blog: None
|
It depends what you want the old browsers to display, if you stop using <table> and use <div>'s with CSS instead the (and use @import to hide it from NN4) then old browsers will see unstyled content. You should just make sure you have meaningful semantic HTML like <h1> and <p> <ul><li> etc etc.
In other words, code your HTML semanticly correct page with no style or layout, untill it all makes sense. Then create a style-sheet for modern browsers.
|
|
|
10-18-2004, 07:31 PM
|
#12 (permalink)
|
|
Inactive
Join Date: 10-13-03
Location: Manitoba, Canada
Posts: 573
Latest Blog: None
|
I know this is a little off subject, because it doesn't help you directly in solving the problem. However consider a client with a N4/IE4 browser. Now imagine them asking you for a site that you had to make work on their web browser. You'd either be stuck with say "we can't do that" over and over again, or pulling out your hair over every aspect of the page.
Spend your time learning new technologies rather than trying to fit N4/IE4 and you will be better suited for more projects. This will make you more money in the end. Trust me. I though I was the last one to drop N4 support. I think I must have been the second last, as you are still posting about it. Seriously, you'll sleep better at night. Drop N4 my friend. 
|
|
|
10-18-2004, 08:52 PM
|
#13 (permalink)
|
|
Moderator
Join Date: 10-13-03
Location: UK
Posts: 2,819
Latest Blog: None
|
that doesn't mean you can't add in a NN4 stylesheet just to be nice :-D Or at the least use the import rule to 'protect' NN4 users form messed up pages.
Just do it how I said (I assume bytech and every one agrees) then you have accomodated every browser in the world, with added style for the most common browsers.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:47 PM.
© Copyright 2008 V7 Inc
|