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
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

8. Getting Started with CSS: Adding a Li... > Getting the Lounge style into the el...

Getting the Lounge style into the elixirs and directions pages

It’s great that we’ve added all this style to “lounge.html”, but what about “elixir.html” and “directions.html”? They need to have a look that is consistent with the main page. Easy enough... just copy the style element and all the rules into each file, right? Not so fast. If you did that, then whenever you needed to change the style of the site, you’d have to change every single file – not what you want. But, luckily, there is a better way. Here’s what you’re going to do:

  1. Take the rules in “lounge.html” and place them in a file called “lounge.css”.

  2. Create an external link to this file from your “lounge.html” file.

  3. Create the same external links in “elixir.html” and “directions.html”.


  

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