Closed Thread Icon

Preserved Topic: CSS in JS reference (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18435" title="Pages that link to Preserved Topic: CSS in JS reference (Page 1 of 1)" rel="nofollow" >Preserved Topic: CSS in JS reference <span class="small">(Page 1 of 1)</span>\

 
bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 02-06-2002 20:47

Anyone know a good reference for finding the JS DOM names for CSS attributes.
Like font-color -> fontColor

???

much thanks



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

vto
Obsessive-Compulsive (I) Inmate

From: Godella, Valencia, Spain
Insane since: Feb 2002

posted posted 02-06-2002 21:39

In http://builder.cnet.com try http://builder.cnet.com/webbuilding/pages/Authoring/CSS/table.html?tag=st.bl.3880.ref_l.bl_tablet
I have another ones but in spanish, if you need...

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-06-2002 21:41

Looks like you've got it down. =)

Any one word CSS property translates into the identical word in JS, with very few exceptions... like, "float" in CSS is changed to "align" in JS since "float" is a reserved word in JavaScript that can't be used for variable names.

If the CSS property is more than one word with a dash, elliminate the dash and change the first letter of the word after the dash into a capital letter.

example: my-cool-property -> myCoolProperty

I'm pretty sure that's all there is to it.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 02-06-2002 21:53

bit,

I usually reference Danny Goodman's Javascript Bible 4th edition. So far it's had everything I've looked for, but I'm not sure how comprehensive it is. I'm not sure about an online resource, there must be some out there.

[edit]that's what I get for taking a while to type my reply before reading the most recent responses.

Everyone I've used so far follows just what Slime says. Here's some examples:

document.body.style.scrollbarFaceColor="#c0c0c0"
document.body.style.scrollbarHighlightColor="#c0c0c0"
document.body.style.scrollbarShadowColor
document.body.style.scrollbar3dLightColor
document.body.style.scrollbarArrowColor
document.body.style.scrollbarTrackColor
document.body.style.scrollbarDarkShadowColor

document.getElementById("menuDiv").style.border="black solid 1px"
document.getElementById("menuDiv").style.color="#ffffff"
document.getElementById("menuDiv").style.backgroundColor="#000000"

[/edit]




[This message has been edited by Bugimus (edited 02-06-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu