Gernot Frisch wrote:
this is where the DIVs of a menu get created:
<div id="menudivs" class="m' + this.container.id + 'l' + this.depth +
'i">'
+ this.fields[0] + "</div>
How do I loop through all of them and move them by "dx" horizontally.
RTFM. There are two ways:
A) Move each "div" element. Obtain the collection of elements with
document.getElementsByTagName() (W3C), document.all() (IE4+) or
document.layers (NN4), then test against the className property
of each element object.
B) Change the value of the left property in the class selector
(not in NS4 and Opera). Obtain the list of stylesheets for
the document with document.styleSheets and the rules with
the document.styleSheets[...].cssRules (Gecko) or the
document.styleSheets[...].rules (IE) collection.
(I want to put this in a window.onresize event handler)
Oh my. Use a proper stylesheet instead. What if client-side script
support is restricted or disabled or the DOM does not support that at
all? Thought about the user's system resources?
PointedEars
P.S.:
Me@privacy.net is not a mailbox address ("A mailbox receives mail"):
|
Me@Privacy.net
| SMTP error from remote mailer after RCPT TO:<Me@privacy.net>:
| host privacy.net [66.46.181.115]:
| 550 relaying mail to privacy.net is not allowed
Thus using it violates Internet/NetNews standards (RFCs 1036
and 2822). Even if it would receive mail, the automated
response described on the website would still disregard
Usenet Netiquette. So people using privacy.net addresses
are automatically killfiled by me from now on.
See [en] <http://www.interhack.net/pubs/munging-harmful/>
and/or [de] <http://gerlo.de/falsche-email-adressen.html>
for details.
P.P.S.: de.comp.lang.javascript exists.