From: Thomas 'PointedEars' Lahn on
Jeff Thies wrote:

> If it works in the stylesheet it should work by using the javascript
> method:

There is no "javascript", and the W3C DOM API is language-independent.

> <div id="my_element">something</div>
> ..
> #my_element{
> color: red;
> }
> ..
> document.getElementById('my_element').style.color = 'red';

This is not supposed to work if the stylesheet is

#my_element {
color: red !important;
}

So to be sure you need

document.getElementById('my_element').style.color = 'green !important';

However, it is better not to grow Reference Worms, and easier to maintain to
set the `className' property of the element to trigger one or more class
based rulesets in the stylesheet.

> Use a proper doctype if you are setting widths, you should anyways.

_DOCTYPE declaration_, and yes.

> What exactly are you trying to do? My Spidey sense whiffs cluelessness.

My Trollium detector is pointing right at postings like the OP's instead.


F'up2 cljs (please crosspost only when necessary)

PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee