But ... it gets worse (this isn't an academic challenge, it's just that I'm only just realising myself how deep this issue is running)

The end use is a dhtml layers API where I have literally no idea what else is going to be on the document. I can't override all possible style properties of all possible elements (div width is only one specific), but of course I can apply new style properties to the layers.

Maybe line-height is a more interesting example - there is no default line-height value - it varies between browsers and even "line-height:auto" isn't useful, because it's unstable in some browsers - such as ns4, where line-height:auto can cause <br> tags to have no visual effect so the lines run over each other - and similair issues in opera 5 and 6.

What I'm after I guess is a method for making part of the document not part of the document, in some way .. somehow ...

Originally posted by brothercake
What I'm after I guess is a method for making part of the document not part of the document, in some way .. somehow ...

Perhaps I'm missing the point, but anonymous content in Gecko, and ViewLink content in IE can be forced to be completely isolated from the document.

brothercake

01-09-2003, 11:40 PM

I don't know what that is ... it sounds good :) I shall check it out

<slightly_later>
Yup, I think that's it. Nice one :thumbsup: or at least, I found plenty of ViewLink documentation for IE; can you recommend any docs on the Mozilla method you mentioned?

I was hoping for a full x-browser solution, but that's pretty unlikely, this helps a lot because at least it narrows down the problem range, and I can do something for the others with class selectors for the most common properties of the most common elements, as others have suggested. thanks.
</slightly_later>

Mr J

01-09-2003, 11:41 PM

Could you not use Class Selectors or ID Selectors

A simple selector can have different classes, thus allowing the same element to have different styles. For example, you may wish to display code in a different color depending on its language:

code.html { color: #191970 }
code.css { color: #4b0082 }

or even

ID Selectors

These are individually assigned for the purpose of defining on a per-element basis. This selector type should only be used sparingly due to its inherent limitations. An ID selector is assigned by using the indicator "#" to precede a name. For example, an ID selector could be assigned as such: