[thelist] Tips
Chris Kaminski
chris at setmajer.com
Mon Jun 10 01:34:01 CDT 2002
A couple to make up for all the pseudo-legal prattle and smart-ass remarks:
<tip type="Netscape 4.x">
To get 0-width page margins without using invalid attributes (marginwidth,
marginheight) in the <body> tag, use the following styles:
body {
margin-top: -10px;
margin-left: -10px;
}
Place those styles in a stylesheet called with the <link> tag, then reset
the margins to 0 for more modern browsers in a stylesheet called by an
@import.
</tip>
<tip type="Netscape 4.x">
To keep your code valid while using the onresize= hack to keep NN4.x from
dropping styles when the window is resized, set the handler in your script,
rather than in the <body> tag, like so:
window.onresize = fixNNCSS();
</tip>
<tip type="Netscape 4.x">
When trying to get CSS layouts working in NN4.x, JavaScript StyleSheets can
often be more useful than Cascading StyleSheets, because they allow
expressions:
ids.main.width = window.innerWidth - 10;
ids.main.fontSize = (navigator.userAgent.toLowerCase.indexOf('mac') == -1)?
'1em':'1.2em';
</tip>
chris.kaminski == ( design | code | analysis )
------------------------------------------------------------
You say it's raining but you're p***ing
down my back
------------------------------------<< Sebastian Bach >>
More information about the thelist
mailing list