Adding Style to the Component

In order to stylize our component, we will create a CSS (Cascading Style Sheets) file called tree.css. This file will contain element ids and classes that we created in the tree object when we created the HTML string that was added to the current document. This file is simple and can be customized to look the way you would like, including link colors, spacing, and so on. Listing 11.17 shows this entire file.

Listing 11.17. Styling the Component (tree.css)
 body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; } .container { color: #333333; font-weight: bold; line-height: 21px; text-decoration: none; } ul { margin: 2px 0px 5px 20px; list-style-type: none; padding: 0px; } li { padding: 2px 0px ...

Get Ajax for Web Application Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.