Wrox Programmer Forums
|
BOOK: Beginning HTML and CSS (published March 2013)
This is the forum to discuss the Wrox book Beginning HTML and CSS by Rob Larsen; ISBN: 978-1-1183-4018-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML and CSS (published March 2013) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2013, 08:02 AM
Registered User
 
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
	<title>Example Cafe - community cafe in Newquay, Cornwall, UK</title>
	<link rel="stylesheet" href="interface.css">    
</head>

<body>
	<img src="images/logo.gif" alt="example cafe logo" width="194" height="80" />
    <nav id="navigation">
    	HOME
        <a href="menu.html">MENU</a>
        <a href="recipes.html">RECIPES</a>
        <a href="opening.html">OPENING</a>
        <a href="contact.html">CONTACT</a>
    </nav>  
    <p>Welcome to example cafe. We will be developing this site throughout the book.</p>
	<img src="images/scrambled_eggs.jpg" alt="Photo of scrambled eggs on an English muffin" width="622" height="370" />    
    <h2>A community cafe serving home cooked, locally sourced, organic food</h2>
    <p>With stunning views of the ocean, Example Cafe offers the perfect environment to unwind and recharge the batteries.</p>
    <p>Our menu offers a wide range of breakfasts, brunches and lunches, including a range of vegetarian options.</p>
    <p>Whether you sip on a fresh, hot coffee or a coolinig smoothie, you never need to feel rushed - relax with friends or just watch the world go by.</p>
    <h2>This weekend's special brunch</h2>
    <p>This weekend, our season of special brunches continues with scrambled egg on an English muffin. Not for the faint-hearted, the secret to these eggs is that they are made with half cream and cooked in butter, with no more than four eggs in the pan at a time.</p>
</body>
</html>
 
Old September 26th, 2013, 08:12 AM
Wrox Author
 
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Everything there looks okay. Is interface.css being loaded correctly?
 
Old September 26th, 2013, 08:55 AM
Registered User
 
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's loading correctly as far as I can tell. Here's the file:

Code:
@charset "utf-8";
/* CSS Document */

/* style sheet for Example Cafe */

body {
	font-family: arial, verdana, sans-serif;
}

h2 {
	font-family: georgia, times, serif;
	color: #666666;
}

p {
	font-size: 90%;
	color: #333333;
{

#navigation a {
	color: #3399cc;
	text-decoration: none;
}
All the elements has been implemented except for the last one.
 
Old September 26th, 2013, 09:49 AM
Wrox Author
 
Join Date: Apr 2012
Posts: 19
Thanks: 0
Thanked 3 Times in 3 Posts
Default

There's an error in your CSS.

Line 18 of your CSS should close the declaration

Code:
p {
	font-size: 90%;
	color: #333333;
{

#navigation a {
	color: #3399cc;
	text-decoration: none;
}
Should be:

Code:
p {
	font-size: 90%;
	color: #333333;
}

#navigation a {
	color: #3399cc;
	text-decoration: none;
}
do you see the difference between the two?
 
Old September 26th, 2013, 09:55 AM
Registered User
 
Join Date: Sep 2013
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, it's working now. Thanks for finding the problem!





Similar Threads
Thread Thread Starter Forum Replies Last Post
listview styling robbaralla BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 8 February 22nd, 2010 06:54 AM
C# Word Styling Automation rangeshram C# 2005 0 April 15th, 2009 01:51 AM
Styling the Menu Control stephenf BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 March 17th, 2009 02:41 PM
PHP Styling adaniels11 PHP How-To 1 April 10th, 2007 05:10 AM
XSLT and styling jacob XSLT 4 October 13th, 2005 02:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.