this.style ?
OK, so Im taking the advice of a critic in my other thread about making the text links "do something" when the links are moused over or moused out (using past tense...lol) Anyways, I have found some commands like this.style.color which obviously changes the color with a mouseover command. I am curious where I can find all of these "this.style" commands? For example, if I want a link to be underlined when I mouseover, what "this.style" command do I use?
Suzanne posted this at 23:00 — 7th January 2004.
She has: 5,507 posts
Joined: Feb 2000
use CSS, not JavaScript -- a:hover
mjs416 posted this at 15:24 — 8th January 2004.
They have: 127 posts
Joined: Dec 2003
Ummm..... that really didnt help me. Thanks?
The Webmistress posted this at 15:47 — 8th January 2004.
She has: 5,586 posts
Joined: Feb 2001
This tutorial site goes over the basics of controlling links with css
mjs416 posted this at 16:51 — 8th January 2004.
They have: 127 posts
Joined: Dec 2003
What an excellent abbreviated tutorial. Thanks a bunch.
The Webmistress posted this at 16:54 — 8th January 2004.
She has: 5,586 posts
Joined: Feb 2001
I find the whole CSS very confusing so it's nice to find a site that breaks down the basics enough for you to be able to use it and then you can build on it from there.
Julia - if life was meant to be easy Michael Angelo would have painted the floor....
mjs416 posted this at 17:05 — 8th January 2004.
They have: 127 posts
Joined: Dec 2003
I agree. I am a software guy , I can program in a few languages for an assortment of applications and enviroments. But something about
a:hover {
text-decoration: none;
background-color: #CCCCCC;
}
still throws me for a loop....lol. =)
The Webmistress posted this at 17:12 — 8th January 2004.
She has: 5,586 posts
Joined: Feb 2001
You'll get the hang of it, I did! Just take it one step at a time and then it does all sink into place and make sense
Abhishek Reddy posted this at 00:52 — 9th January 2004.
He has: 3,348 posts
Joined: Jul 2001
I'm always surprised when programmers say they don't get CSS.
Using a CSS file to describe output styles is like using some sort of 'definition library'... could liken it to theming an interface/toolkit. That is, you have content (text/images), within a framework (XHTML/XML) which for our purposes is like loading the content into a program, and you use included style definitions to alter the way the interface looks (e.g. change foreground/background colours of interface).
The only other possibility I can think of is that programmers are unfamiliar with using the DOM... but that can't be, because programmers work with all kinds of objects. In fact, a better way look at it is this: the content is housed within an "object" (outlined by XHTML/HTML DOM), and each element of this object has style properties, which can be delineated by CSS (and Javascript).
Interfacing with XML documents is not limited to only client-side web scripting, so should not be dark territory to programmers at all. Using a stylesheet is just one way of describing the appearance of elements in an XML document... just a simple set of definitions.
Sorry if I sound like I'm ranting or going off on a tangent. I was just thinking aloud.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.