explanation wanted

R

Richard

http://homepage.ntlworld.com/russell.baldwin/csstest/menu1a.html

Referring to this page as my source, I understand the purpose of hover,
visited, and active, but what the heck is "focus"?

Then to confuse me a tad more, he uses a line like -- body.section-1 #menu
ul#subnav-1,.

Obviously, this guy knows how to truly manipulate css. I kind of understand
how you can sub-define classes so you don't have to repeat the coding. But
in the "body"? He does this four times to create his menu with.

I'm open for clues.
 
D

David Dorward

Richard said:
visited, and active, but what the heck is "focus"?

When the element has the focus. Common example is <input> elements, when the
user can type in to the element, it has the focus. The other common example
is hyperlinks is tab-based (as opposed to mouse-based) navigation.
Then to confuse me a tad more, he uses a line like -- body.section-1 #menu
ul#subnav-1,.

Obviously, this guy knows how to truly manipulate css. I kind of
understand
how you can sub-define classes so you don't have to repeat the coding.

There is no such thing as a sub-class in CSS.
But in the "body"? He does this four times to create his menu with.

Some pages will have <body class="section-1"> some will have <body
class="section-2"> and so on. Presumably different menu sections and
visible depending on which section its in.
 
D

David Dorward

Richard said:
brucie! wrote:
So does this mean that if someone were to press enter instead of clicking
the action would happen anyway?

What action? :focus just suggests how an element should look when it has the
focus, it doesn't define any action. If a textarea has the focus, then
pressing enter creates a new line in that textarea.
 
R

rf

Richard said:
So does this mean that if someone were to press enter instead of clicking
the action would happen anyway?

Have you never heard of "keyboard navigation"?

Cheers
Richard.
 
L

Leif K-Brooks

Richard said:
Yes. Only problem is, very few sites use it.

Users use keyboard navigation, not sites. Are you sure you know what rf
is talking about?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top