In IE I can use expression() to find out the current width of the document and return a calculated value to set a <div> width, like this:
width: expression( document.body.clientWidth - 400 + "px" )
where what I want to do is set the width of a middle <div> surrounded by a right and left <div> of fixed widths.
What is the equivalent process in NN?
Thank you.
JMEhow is the client's browser width related to your design? The best solution is to make a design that works at any width.You have used IE proprietary objects that no other browser supports. clientWidth is not a W3C recommended standard. document.body should work in all browsers. expression is also an IE proprietary feature.
If you want your page to work in many different browsers, visit the W3C and find a recommended way to do it. There may still be quirks, since everyone has their own idea of what the W3C means, but it is a start.
<!-- m --><a class="postlink" href="http://www.w3.org/Style/CSS/I">http://www.w3.org/Style/CSS/I</a><!-- m --> am familiar with W3, that is, I've read most of the standards. That does not mean I actually know what to do with them.
My browser width and document width are the same (minus the usual borders, etc.)
What I like about the IE expression() function is that one can evaluate a DOM object property in-line, on the fly, without having to use javascript or some other scripting language.
I can find nothing similar in NN, and am simply wondering if I am missing something -- or in fact it does not exist.
ThanksNetscape exposes window.innerWidth which is the usable browser area inside the borders. They also support document.width.
Netscape 4 had a proprietary method of using calculations in CSS. I do not know if newer versions support it, but I doubt it. They adhere to W3 recommendations, and that feature is not currently included. See <!-- m --><a class="postlink" href="http://developer.netscape.com/docs/manuals/communicator/dynhtml/layers32.htm#1038571">http://developer.netscape.com/docs/manu ... tm#1038571</a><!-- m --> for an explanation."Netscape 4 had a proprietary method of using calculations in CSS"
You are right, this sort of inline code does not seem to work beyond NN5.
Thanks for the tip, though.
width: expression( document.body.clientWidth - 400 + "px" )
where what I want to do is set the width of a middle <div> surrounded by a right and left <div> of fixed widths.
What is the equivalent process in NN?
Thank you.
JMEhow is the client's browser width related to your design? The best solution is to make a design that works at any width.You have used IE proprietary objects that no other browser supports. clientWidth is not a W3C recommended standard. document.body should work in all browsers. expression is also an IE proprietary feature.
If you want your page to work in many different browsers, visit the W3C and find a recommended way to do it. There may still be quirks, since everyone has their own idea of what the W3C means, but it is a start.
<!-- m --><a class="postlink" href="http://www.w3.org/Style/CSS/I">http://www.w3.org/Style/CSS/I</a><!-- m --> am familiar with W3, that is, I've read most of the standards. That does not mean I actually know what to do with them.
My browser width and document width are the same (minus the usual borders, etc.)
What I like about the IE expression() function is that one can evaluate a DOM object property in-line, on the fly, without having to use javascript or some other scripting language.
I can find nothing similar in NN, and am simply wondering if I am missing something -- or in fact it does not exist.
ThanksNetscape exposes window.innerWidth which is the usable browser area inside the borders. They also support document.width.
Netscape 4 had a proprietary method of using calculations in CSS. I do not know if newer versions support it, but I doubt it. They adhere to W3 recommendations, and that feature is not currently included. See <!-- m --><a class="postlink" href="http://developer.netscape.com/docs/manuals/communicator/dynhtml/layers32.htm#1038571">http://developer.netscape.com/docs/manu ... tm#1038571</a><!-- m --> for an explanation."Netscape 4 had a proprietary method of using calculations in CSS"
You are right, this sort of inline code does not seem to work beyond NN5.
Thanks for the tip, though.