Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook

(Nora) #1

256 CHAPTER 5 More HTML5



  1. Now that the default.html file is completed, modify the style sheet by opening the
    default.css file and, at the bottom, adding the table selector and setting the width to
    100 percent as follows.
    table {
    width: 100%;
    }

  2. Add a td selector and set the width to 25 percent as follows.
    td {
    width: 25%;
    }

  3. Locate the existing button selector. Change the width to 90 percent as follows.
    button {
    background-color: hsl(255, 50%, 80%);
    width: 90%;
    height: 10%;
    border: outset;
    }

  4. Locate the existing input selector. Change the padding to 5 pixels as follows.
    input {
    width: 85%;
    height: 7%;
    text-align: right;
    padding: 5px;
    border: inset;
    }

  5. Press F5 to run the application.
    Figure 5-19 shows the completed calculator.

Free download pdf