• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 69. Applying Styles to Text Widg... > Changing the Colors and the Border

Changing the Colors and the Border

The color and background-color CSS attributes allow you to modify the foreground and background colors of a text widget, as in Figure 69.2. You can also modify the borders of buttons with the border-color, border-width, and border-style attributes.

Listing 69.2. View Source for Figure 69.2.

<head>
  <style type="text/css">

    .listsmenus {
      color: #FFFFFF;
      background-color: #000000;
  }

    .buttons {
      background-color: #000000;
      color: #FFFFFF;
      border-color: #999999;
      border-width: 6px;
      border-style: double;
      font-weight: bold;
}

  </style>
</head>

<body>

  <form>
    <table cellpadding="10">
      <tr valign="top">
        <td><select name="select" size="5" class="listsmenus">
              <option value="1" selected>List Option 1</option>
              <option value="2">List Option 2</option>
              <option value="3">List Option 3</option>
              <option value="4">List Option 4</option>
              <option value="5">List Option 5</option>
            </select></td>
        <td><select name="select" class="listsmenus">
              <option value="1" selected>Menu Option 1</option>
              <option value="2">Menu Option 2</option>
              <option value="3">Menu Option 3</option>
              <option value="4">Menu Option 4</option>
              <option value="5">Menu Option 5</option>
            </select></td>
      </tr>
      <tr>
        <td colspan="2" align="center"><input type="submit" class="buttons" value="Submit"></td>
      </tr>
    </table>
  </form>

</body>


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint