HTML and CSS Reference
In-Depth Information
In this case, the border-spacing and empty-cells properties will be ignored. The padding and border of the
header and data cells can be set as shown in Listing 12-16.
Listing 12-16. Padding and Border for Header and Data Cells
th, td {
padding: 10px;
border: 1px solid #13b141;
Drop-Down Selection Lists
Selection lists can provide options to choose from. Suppose a language selector is needed for a multilingual web site.
It can be developed as follows:
Create a selection list with the select element.
Add the default option.
<option value="" selected="selected">English</option>
Add further options. Provide the URIs of each language version as the option values.
<option value="" selected="selected">English</option>
<option value="">Deutsch</option>
<option value="">Français</option>
<option value="">Español</option>
<option value=""> 本語 </option>
To load the appropriate web page, the subdomains provided as the option values can be
used as target URIs through an event handler. Although the use of the onchange event
handler would be logical, it would be inaccessible for keyboard users. One of the solutions
is to provide a button with an onclick event handler, which is device-independent. For
example, the following function
<script type="text/javascript">
function goto_URL(object) {
Search WWH ::

Custom Search