JavaScript EditorBest javascript editor debugger     Ajax website 



Main Page

Previous Page
Next Page

The Inspiration of Others: CSS

In Chapter 2, Working with Web Page Files, I showed you how to see the source code for a Web page. Viewing someone's CSS is not much more difficult.

To view other designers' CSS code:

1.
First view the page's (X)HTML code (Figure 8.25). For more details on viewing (X)HTML source code, see The Inspiration of Others on page 53.

Figure 8.25. View the source code for the (X)HTML page you're interested in and then copy the URL from the href attribute of the link element or the @import rule.


If the CSS code is in an internal style sheet, you'll be able to see it already.

2.
If the CSS is in an external style sheet, copy the URL shown in the link element or imported with an @import rule.

3.
Paste the style sheet's URL in the Address box of your browser and hit Enter. If the style sheet's URL is a relative address (see page 35), you may have to reconstruct the style sheet's URL by combining the Web page's URL with the style sheet's relative URL (Figures 8.26 and 8.27).

Figure 8.26. This is the URL for the page whose CSS we're interested in.


Figure 8.27. Paste the relative URL that you copied in Figure 8.25 in place of the Web page's file name in the full URL. Depending on the relative URL, you may need to remove the Web page's original directory as well. Press Enter.


Tip

  • As with (X)HTML, use other designers' code for inspiration, then write your own style sheets.

    Figure 8.28. The CSS code is shown either right in the browser source window or in an external text editor (as shown here), depending on your browser and its preferences.



Previous Page
Next Page


JavaScript EditorBest javascript editor debugger     Ajax website 
R7