Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

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

4. Dialog Boxes > Formatting Content

Formatting Content

Using the dialog () method drastically changes the appearance of HTML elements on the rendered page. Indeed, this method scans the HTML and adds new CSS classes to the elements concerned (here, the dialog boxes) to give them the appropriate style.

Here, for example, the HTML code that appears after the dialog () instruction has been changed (Figure 4-3). This code was retrieved using the Firebug extension in Firefox.

HTML code generated with the dialog () method

Figure 4-3. HTML code generated with the dialog () method

These CSS classes can customize the display of elements. For example, if we change the ui-dialog-titlebar CSS class associated with <div> elements, we get a new aspect for the window title. Similarly, if we change the ui-dialog-content CSS class associated with <div> elements, we get a new appearance for the content of the windows.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint