The Book place
SEARCH
0-9
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
PARTS:
Part 44
Part 45
Part 46
Part 47
Part 48
Part 49
Part 50
Part 51
Part 52
Part 53
Part 54
Part 55
Part 56
Part 57
Part 58
Part 59
Part 60
Part 61
Part 62
Part 63
Prev
|
Current Page 951
|
Next
Joseph W. Lowery
"Dreamweaver CS3 Bible"
FIGURE 14-17
Style the
and
tags to really make them stand out from a form with a colored background.
Highlighting focus
Want to spotlight the interactivity of a form? CSS includes a pseudo-element selector (so called because it is
valid only when an element is in a particular state) that takes effect when a form element is selected. The
CSS selector is :focus and it works with
,
, and
tags.
To create a :focus selector, follow these steps:
1. Select New CSS Rule from the CSS Styles panel.
2. In the New CSS Rule dialog box, select the Advanced selector option.
3. Enter the name of the tag you want to affect followed by :focus in the Selector field. For example,
if you wanted to alter all the text fields, radio buttons, checkboxes, and buttons when they
receive focus, enter input:focus.
4. Click OK to close the New CSS Rule dialog and open the CSS Rule Definition dialog.
5. Choose the desired styles from the various categories and click OK when you??™re finished.
Preview the page in a compatible browser such as Mozilla Firefox, Netscape 6 or better, Safari, and so on to
experience the CSS changes (see Figure 14-18).
516
Adding Advanced Design Features Part III
FIGURE 14-18
Text in a selected field is shown in bright red and bold, thanks to the :focus selector.
Pages:
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
An Account of the Reconquest of the Sudan (page 255)
Adonais (page 61)
An Account of the Proceedings on the Trial of Susan B. Anthony, on the Charge of Illegal Voting (page 260)