O'Reilly logo

jQuery UI Themes Beginner's Guide by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - nesting styles

The last changes we made to our todo list example showed us how to remove duplicate CSS properties. We have a better control of how we apply styles to our widget, if we can classify the HTML elements within. Our todo list widget has an outer container that holds the widget content. Let's see if we can use this to our advantage:

  1. Open the index.html file we created in our todo list example and replace the contents with the following:
    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Todo List</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="todo-list"> <h3>TODO</h3> <ul> <li>Design user interface</li> <li>Implement form validation</li> <li>Deploy</li> </ul> </div> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required