Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounded table - Mozilla/NS6 1

Status
Not open for further replies.

hads

Technical User
Nov 12, 2001
257
AU
Hey all,

I've never made a rounded corner table before and I'm having a spot of trouble.

Seems to work fine in IE but not in Mozilla/Netscape 6 - the corner pictures don't seem to line up quite right.

I can't quite see where my problem is, I think I need another set of eyes to look it over.

The page is at at the mo. (background is white and borders are set for testing purposes)

Cheers for any comments,
[smurf]
01101000011000010110010001110011
 
Hi,
i only have IE6 and yeah it looks fine.
I couldnt spot anything in the code which I thought was significant.

Oh, and should you have this
<html xmlns=&quot; instead of just <html>. Different issue.

Sorry no help



É
<!--#include file=&quot;profound quotation&quot; -->
 
I see what you're saying about NS6 adding extra space in those corner boxes. Have you tried making the middle spacer .gif (clear.gif) only 1px high? It looks like something in that cell is causing the row to be taller than you want.

Of course, you passed the letter of the XHTML validator, but not the spirit, since you're using a table for layout... But I'm not going to evangelize ;o)
 
Thanks for the tip cian, just out of curiosity, can you tell me what the signifigance of the <html xmlns=&quot; is?

Thanks pcorreia, I have tried that because that's exactly what I thought, but it didn't change anything, so I changedit back.

[bomb]
I know I'm not in the spirit of supporting devices but I just like having clean(ish) code.

[smurf]
01101000011000010110010001110011
 
Hi hads, to be honest I dont know the significance, I never bothered looking into xhtml. When I checked your code with my validator that was the only error, so it automatically entered that line, after that zero errors!


If you get a solution can you let us know? usually the problem I get is just extra spaces in the code but you have removed those anyway.


É
<!--#include file=&quot;profound quotation&quot; -->
 
With respect to the
Code:
xmlns
attribute:

Since XHTML is actually a version of XML, it must follow all the rules of well-formed and valid XML. One of those rules is that the root node (which in XHTML is the
Code:
<html>
tag) must have a namespace specified. So, what's a namespace?

A namespace is a method of allowing more than one kind of XML to be mixed in a single document. For example, if MathML continues to gain acceptance, it may be possible in the future to embed an XML description of a mathematical equation right in the middle of your XHTML document. But we need a way to tell the user agent, especially a validating user agent, which XML spec any given tag belongs to. &quot;Which XML spec any given tag belongs to&quot; is called the tag's namespace. In this way, XML namespaces are sort of similar to HTTP content-type declarations.

To continue the example of mixing MathML and XHTML, the user agent, which has been chugging along happily rendering XHMTL, comes across a
Code:
<mfrac>
tag. If there were no way to tell it that this tag were part of MathML and not part of XHTML, the user agent would think this was an invalid element. If, instead, you can tell it that the
Code:
<mfrac>
element belongs to the MathML namespace and not the XHTML namespace, it might then understand what to do with it.

For more information on XML namespaces, read the following document:
 
Well there you go! - Thanks for the info pcorreia.

I haven't fixed it but figured out that if I remove the DTD then it fixes the space. Weird. It does the same thing with either a XHTML DTD or a HTML4 DTD.

Not too sure what the reason is but thats what I have so far.

[smurf]
01101000011000010110010001110011
 
Ah, what you're looking at there is &quot;quirks&quot; mode, otherwise known as DOCTYPE sniffing. The major browsers have a &quot;feature&quot; that, depending on the DOCTYPE specified, they may enter a mode where they emulate the quirks of older versions -- IE6 in quirks mode will emulate some of the quirks of IE5, and Netscape 6 does the same thing, falling back to some quirks of Netscape 4. Here's some more information:




So, what this means is that your problems are related somehow to code which works in downlevel browsers but won't work in browsers that strictly enforce XHTML standards. IE is more forgiving in this regard than Netscape, so that's why your problems are only showing up there. There's no guarantee that future browser versions will support quirks mode, so this could be considered a temporary fix until you find out what the real problem is. Of course, your pages won't validate without a DOCTYPE, so maybe you could find an older DOCTYPE (maybe HTML 4.01) that will keep the browsers in quirks mode...
 
Heh, didn't realize Netscape had that new 'feature' aswell. I thought IE6 was the only one that gave us that.

Unfortunatly It does exactly the same thing with a HTML 4.01 DTD.

Oh well, I'm sure I will figure something out, either that or just design a new page :)

Thanks for the discussion guys.

[smurf]
01101000011000010110010001110011
 
Hey again, incase anyone is interested...

A HTML 4.0 Doctype will put Mozilla/NS6 into 'quirks' mode and thus make the tables render correctly, apparently IE will run in 'strict' mode with the same DTD but the tables still render correctly.

After some hunting round I have noticed that all sites I come across using rounded-corner tables are either using a 4.0 Doctype or none at all, and if you take their code and put a 4.01 or XHTML DTD on it it will not render correctly.

Oh well :( I have labeled my pages HTML 4.0 at the moment and will be creating a new design sometime, they still validate except for a couple of weirdo ASP.NET things - it's just part of a personal learning curve anyway.

Check it out if you want -
Thanks for all the help.

hads [smurf]
01101000011000010110010001110011
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top