I’m frustrated

Example Code not Usable for CSS Cookbook

I bought this book, "CSS Cookbook", and downloaded the sample code from this website. It seems to be a series of unusable txt files. Is there some way that I can get files that can be used with Microsoft Expression Web so that I can try the examples without typing all the code in myself??
1 person has
this problem
  • Hi William,

    I'm sorry for the frustration. The example files for CSS Cookbook include the code references/snippets from the text, so that you can copy the pieces you need and work with them. You're right that the files themselves aren't usable examples, instead they contain the example content. If you open the txt files in a text editor, you should be able to copy out the snippets of code and use those in Expression Web, Dreamweaver, or a plain text editor.

    The snippets are divided by horizontal lines. Some snippets are just tiny code examples, like what the markup for an image tag looks like, while others are examples of whole pages. If you copy a snippet into a new document and save it as an html or css file, you should be able to use the examples to follow along with the book.

    Here's an example of a complete html file from the chapter 2 example file:

    <title>CSS Cookbook</title>
    <style type="text/css">
    * {
    font-family: verdana, arial, sans-serif;
    h1 {
    font-size: 120%;
    #navigation {
    border: 1px solid black;
    padding: 40px;
    li a {
    text-decoration: none;
    p {
    font-size: 90%;
    <h1>Title of Page</h1>
    <p>This is a sample paragraph with a
    <a href="http://csscookbook.com">link</a>. Lorem ipsum dolor sit amet,
    consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
    laoreet dolore magna <em class="warning">aliquam erat volutpat</em>. Ut
    wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit
    lobortis nisl ut aliquip ex ea commodo consequat.<p>
    <ul id="navigation">
    <li><a href="http://csscookbook.com">Apples</a></li>
    <li><a href="http://csscookbook.com">Bananas</a></li>
    <li><a href="http://csscookbook.com">Cherries</a></li>

    I hope this helps! If you still have questions, feel free to contact booktech@oreilly.com, our book technical support group, and they can work through this with you.


    Rachel James
    O'Reilly Media
  • (some HTML allowed)
    How does this make you feel?
    Add Image

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited sad, anxious, confused, frustrated indifferent, undecided, unconcerned