Question for HTML Coders

Discussion in 'Archived Threads 2001-2004' started by Jeff D., Jan 18, 2003.

  1. Jeff D.

    Jeff D. Supporting Actor

    Joined:
    Jul 10, 1999
    Messages:
    521
    Likes Received:
    0
    Trophy Points:
    0
    I'm working on a new website, creating both frames and non-frames versions. I thought I'd download the two other most popular browsers (Netscape and Opera) to make sure I had good cross-platform code. Well IE and Opera are happy, but Netscape is a pain in the arse. Are there known issues with the way Netscape deals with frames??
    Here is the code for my frameset page:
    HTML
    HEAD
    /HEAD
    FRAMESET ROWS="87,402,*" BORDER="0"
    FRAME SRC="001/_home.html" SCROLLING="NO" NAME="top" NORESIZE MARGINHEIGHT="0" MARGINWIDTH="0"
    FRAME SRC="002/_home.html" SCROLLING="NO" NAME="middle" NORESIZE MARGINHEIGHT="0" MARGINWIDTH="0"
    FRAME SRC="003/_home.html" SCROLLING="NO" NAME="bottom" NORESIZE MARGINHEIGHT="0" MARGINWIDTH="0"
    /FRAMESET
    /HTML
    I've gone through it until I'm blue in the face. I've also run all the FRAME SRC pages through an HTML tester, and I've studied them too, and they are fine.
    But Netscape is screwing up. It looks like its getting the dimensions all wrong, and the bottom frame is covering up the frame above it by several pixels.
    Anyone have any ideas?? I'm at my wits end. [​IMG]
    /Jeff
     
  2. Peter McDonald

    Peter McDonald Stunt Coordinator

    Joined:
    Jul 24, 2001
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    What version of Netscape is it?
     
  3. Jeff D.

    Jeff D. Supporting Actor

    Joined:
    Jul 10, 1999
    Messages:
    521
    Likes Received:
    0
    Trophy Points:
    0
    Peter:

    7.01 - the current version available for download at the site.

    /Jeff
     
  4. Peter McDonald

    Peter McDonald Stunt Coordinator

    Joined:
    Jul 24, 2001
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Hmm... I tested the code and I can't see anything wrong with it in Netscape 7.

    Do you have the site uploaded to the web? Because I really can't see a problem with the code...

    Peter
     
  5. Jeff D.

    Jeff D. Supporting Actor

    Joined:
    Jul 10, 1999
    Messages:
    521
    Likes Received:
    0
    Trophy Points:
    0
    Peter;
    OK, I put the code up on the website for you to see. The link to the FRAMESET page is
    http://www.creativeaudio.ca/test/frames/index.html
    Now, that page is composed of three seperate HTML pages, found here:
    http://www.creativeaudio.ca/test/frames/001/_home.html
    http://www.creativeaudio.ca/test/frames/002/_home.html
    http://www.creativeaudio.ca/test/frames/003/_home.html
    I seem to have located the 'problem'. I say problem that way because Netscape is the only program that is having trouble. What I did was I built the entire page in one massive table (which has many nested tables) in pure HTML, to work out the layout. Once I got it, I broke the main table into three pieces to make up the different frames.
    The problems for Netscape start in the first of these files (in the 001 directory). I've narrowed it down to the Celebrating 25 Years graphic in the top right hand corner. Load that first page in IE or Opera and everything is perfect. Now load in Netscape - notice how there is white space below that graphic, and the line underneath the various menu options gets thick - it should be 1 pixel high like the rest of them.
    What is weird is, Netscape has no trouble with the single HTML file I created - everything looks perfect. But chop it up and it doesn't like it. I've gone through the code and I'm positive I've terminated all the tables properly.
    This is driving me mental...I see NO reason for it to be doing this!! [​IMG]
    Thanks for any help you can offer.
    /Jeff
     
  6. Peter McDonald

    Peter McDonald Stunt Coordinator

    Joined:
    Jul 24, 2001
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    I went through it, and I can't find the problem.

    However, if you take the doctype out of the page, everything loads fine...

    Peter
     
  7. nolesrule

    nolesrule Producer

    Joined:
    Aug 6, 2001
    Messages:
    3,084
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Clearwater, FL
    Real Name:
    Joe Kauffman
    Try using the HTML4 transitional DTD instead of strict.
     
  8. Jeff D.

    Jeff D. Supporting Actor

    Joined:
    Jul 10, 1999
    Messages:
    521
    Likes Received:
    0
    Trophy Points:
    0
    Well, that seemed to work! Thanks guys!
    Now, this is the first time I've included the DOCTYPE in a website I've done - is it really necessary? What is it doing? I put it in there because I was told it was a good thing...but until now it has just wasted a lot of my time. Thoughts?
    Thanks again! [​IMG]
    /Jeff
     
  9. nolesrule

    nolesrule Producer

    Joined:
    Aug 6, 2001
    Messages:
    3,084
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Clearwater, FL
    Real Name:
    Joe Kauffman
    A valid HTML document must have a document type declaration (DTD), so yes, it is required. It tells the browser the type of document it is trying to parse. There are many different document types that current browsers can parse, including HTML 2, 3.2, 4, 4.01, XHTML, XML and more.

    Many attributes and tags were deparacted in HTML 4.01 in favor of using style sheets. The transitional DTD gives some leeway in that regard, while strict does not. The thing is, if your document doesn't follow its DTD, then it's up to the browser to determine how the HTML should be interpretted, which can cause all sorts of havoc.
     
  10. Jeff D.

    Jeff D. Supporting Actor

    Joined:
    Jul 10, 1999
    Messages:
    521
    Likes Received:
    0
    Trophy Points:
    0
    Thanks a million for all your help everyone! I've taken Joe's suggestion, re: replacing the strict with the transitional DTD. Now, all is well with the world.
    Cheers Everyone! [​IMG]
    /Jeff
     
  11. Joseph S

    Joseph S Cinematographer

    Joined:
    Dec 23, 1999
    Messages:
    2,862
    Likes Received:
    0
    Trophy Points:
    0
    Here's what the iCab browser says is wrong.
    http://www.creativeaudio.ca/test/frames/index.html
    Error (10/3): The tag FRAMESET is only part of "HTML 4.0 Frameset".
    Warning (10/3): The attribute "BORDER" is not allowed for the tag .
    Error (11/5): The tag FRAME is only part of "HTML 4.0 Frameset".
    http://www.creativeaudio.ca/test/frames/001/_home.html
    Error (11/1): The tag CENTER is not part of "HTML 4.0 Strict".
    Error (13/1): In the tag TABLE the attribute "COLS" is not allowed.
    Warning (44/6): The attribute "BACKGROUND" is not allowed for the tag TD.
    Error (46/3): In the tag TABLE the attribute "COLS" is not allowed.
    Warning (48/7): The attribute "BACKGROUND" is not allowed for the tag TD.
    Error (78/0): TITLE is missing.
    http://www.creativeaudio.ca/test/frames/002/_home.html
    Error (11/1): The tag CENTER is not part of "HTML 4.0 Strict".
    Error (12/1): In the tag TABLE the attribute "COLS" is not allowed.
    Warning (19/6): The attribute "BACKGROUND" is not allowed for the tag TD.
    Error (35/2): In the tag < TABLE > the attribute "COLS" is not allowed.
    Error (101/0): < TITLE > is missing.
    http://www.creativeaudio.ca/test/frames/003/_home.html
    Error (11/1): The tag CENTER is not part of "HTML 4.0 Strict".
    Error (12/1): In the tag TABLE the attribute "COLS" is not allowed.
    Warning (21/6): The attribute "BACKGROUND" is not allowed for the tag TD.
    Error (49/0): TITLE is missing.
     
  12. nolesrule

    nolesrule Producer

    Joined:
    Aug 6, 2001
    Messages:
    3,084
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Clearwater, FL
    Real Name:
    Joe Kauffman
    And those errors were because of the Strict HTML 4 DTD. He needed to use transitional to support those specific tags and attributes he was using.
     
  13. Patrick Sun

    Patrick Sun Moderator
    Moderator

    Joined:
    Jun 30, 1999
    Messages:
    38,749
    Likes Received:
    480
    Trophy Points:
    9,110
    Folks, please be careful with the ""
    when typing it into your posts because they can be interpreted as HTML tags which can have unpredictable results in the forum scripting language. Put spaces before or after the ""'s (like I did in editing post #11 above to pass on the correct tags for the coding help for Jeff.
     
  14. Jeff D.

    Jeff D. Supporting Actor

    Joined:
    Jul 10, 1999
    Messages:
    521
    Likes Received:
    0
    Trophy Points:
    0
    So, switching to Transitional solved my problems...but now I wonder...is it a real solution??

    Should I be looking to conform to strict 4.01 standards? Is there any reason to do so? For the moment I need to get cracking, so I will leave things as they are. But, if this is something I should do, I will poke at it slowly.

    Thoughts?

    /Jeff
     
  15. nolesrule

    nolesrule Producer

    Joined:
    Aug 6, 2001
    Messages:
    3,084
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Clearwater, FL
    Real Name:
    Joe Kauffman
    Yes, the transitional DTD is a legit solution, especially if you have significant traffic coming from IE 4 or NS 4.x, because they handle style sheets badly.

    If you're asking about future proof, the DTD should help with that. However, the standard is currently moving from XML to XHTML for web page coding.

    Even though I use style sheets in my pages, I still use Transitional because of (mainly) Netscape 4.x (what a crappy browser).
     
  16. Jeff D.

    Jeff D. Supporting Actor

    Joined:
    Jul 10, 1999
    Messages:
    521
    Likes Received:
    0
    Trophy Points:
    0
    Joe:

    How seriously should I take the 4.01 recommendations? I put one of my pages through the Validator, and one thing it didn't like was the way I structured my tables. I did some reading, and learned quite a bit. I am now thinking of restructuring, using proper HTML 4.01 (ie. I was using COLS in the TABLE element, but apparently I should be using COLGROUP).

    I see that Style Sheets are very much emphasised. For example, I should be declaring my background colour in the Style Sheet, rather than the BODY tag.

    I have no problem doing this...and I am learning quite a bit along the way. But I wonder...am I potentially ruining the experience for people with old browsers? Should I still use the 'deprecated' format for this kind of compatibility?

    /Jeff
     
  17. nolesrule

    nolesrule Producer

    Joined:
    Aug 6, 2001
    Messages:
    3,084
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Clearwater, FL
    Real Name:
    Joe Kauffman
    That's an issue you'll have to decide on for yourself based on what browsers will be used to view the site. That's why all sites should be tested in IE 5 and up, NS 4 and up and at least Opera.

    My personal opinion is to hell with NS 4.x. Anyone who is still using that buggy piece of crap should be taken out back for a good whooping.

    IE 5 and up, any browser based on Mozilla (like NS 6 or 7) and Opera should be fine for testing, plus use a good HTML Validator.

    But yeah, you should always stick to the recommendations as best as possible, because if you don't, you could wind up with unpredictable results. Don't forget, there's IE for Mac, Mozilla for Linux, Konqueror for Linux, Lynx (text-based), AOL default browser and more. Since you can't test every browser type to see how non-spec code will be rendered, you need to stick to the recommendations.

    Lastly, don't use frames unless you have to. Just find a more efficient way to lay out the table. Frames are the least predictable cross-browser of the lot and won't work in text browsers. They will also cause accessibility problems when a user overrides your style settings with their own.
     
  18. Jeff D.

    Jeff D. Supporting Actor

    Joined:
    Jul 10, 1999
    Messages:
    521
    Likes Received:
    0
    Trophy Points:
    0
    OK, so I am trying to do a good thing, trying to conform to standards. But I don't feel like I'm being well rewarded for it. [​IMG]
    If you could go to http://www.creativeaudio.ca/Test/index.html and see what I'm trying to do...
    The site is visually intensive. My initial design, which broke a lot of HTML 4.01 rules, apparently, used one large table with many nested tables. The end result is a box with many other smaller boxes inside, some blank and some with things like navigation links etc. and of course content.
    So, I tried it using the COLGROUP method. I created one big table, with the proper number of columns necessary for all the different elements of the design. There are a lot of columns, but I have done the work on paper three times now, and they are set correctly.
    All I have put in the page so far is the first two rows. Row 1 uses the side columns (1 pixel wide) for the edge and then spans the 23 columns in the middle for a 1 pixel high border (the entire square should be framed).
    Row 2 is for navigation links. There should be six boxes, 88 pixels wide, with 1 pixel borders in between. Then, at the end, a box 84 pixels wide to hold a different graphic.
    I hope this isn't too confusing. My problem is - what the F$%K is Internet Explorer doing with this?? When I load it, it screws it all up. Netscape works fine with it. But IE and Opera do not. I have stripped the code down to pretty much the bare essentials and still nothing. Either I am missing something, or there is something wrong with IE.
    But, I've spent the last 5 hours trying to conform to standards and this is what happens. I wanna cry. [​IMG]
    /Jeff
     

Share This Page