Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning HTML, XHTML, CSS, and JavaScript
This is the forum to discuss the Wrox book Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett; ISBN: 978-0-470-54070-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML, XHTML, CSS, and JavaScript 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 March 14th, 2011, 08:18 AM
Authorized User
Points: 128, Level: 2
Points: 128, Level: 2 Points: 128, Level: 2 Points: 128, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2011
Posts: 25
Thanks: 2
Thanked 1 Time in 1 Post
Default Problems with CSS

Hi, I'm having problems with my code for Exercise 1 of Chapter 8 in "Beginning HTML, XHTML, CSS and Javascript" The css stylesheet that I have for my my html, for that particular exercise is exactly the same as it is in the appendix of the book.
* exercise 1 */

body {
font-text:arial, verdana, sans-serif;}
font-size:12px;
background-color:#ffffff;}


ul {background-color:#d6d6d6;
list-style:circle;
font-weight:bold;
padding-left:30px;
width:250px;}

ul ul {
list-style:square;
width:220px;}

a {
font-text:arial, verdana, sans-serif;}
font-size:12px;
font-weight:bold;}

a:link {
color:#0033ff;
text-decoration:none;}

a:visited {
color:#0066ff;
text-decoration:none;}


a:link:hover {
color:#003399;
background-color:#e9e9e9;
text-decoration:underline;}


a:active {text-decoration:underline;}

However, my html page does not turn out like it's suppose to at all. There is no grey box for the links. The cirlce bulletpoints are dots instead of hollow circles. The links don't correspond to the css rules properly. They start out with underlines, they are not bold, as well as other things. I'm not sure what is wrong. Any help would be greatly appreciated.
 
Old March 15th, 2011, 10:16 PM
Authorized User
Points: 105, Level: 2
Points: 105, Level: 2 Points: 105, Level: 2 Points: 105, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 19
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Hi,

It looks like there are a couple of the CSS rules that have been closed early - and have the wrong properties.

In the rule for body, that should start out font-family (not font-text), and the end of that line has a closing curly brace where there should not be one.

There is a similar problem in the rule for the a element (again it says font-text, not font-family, and it closes early).

Right at the start the comment should start /* (there was not forward slash - although this might just be a slip if you copied it in ).

Hope that helps catch a couple of your problems!

If it is still not working, could you post your HTML code as well as your CSS and we can take another look.

All the best.
 
Old March 19th, 2011, 03:40 PM
Registered User
 
Join Date: Feb 2011
Posts: 6
Thanks: 2
Thanked 1 Time in 1 Post
Default

Code:
ul ul {
list-style:square;
width:220px;}
Should be:

Code:
ul
{list-style-type:square;
width:220px;}
 
Old March 22nd, 2011, 09:49 AM
Authorized User
Points: 128, Level: 2
Points: 128, Level: 2 Points: 128, Level: 2 Points: 128, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2011
Posts: 25
Thanks: 2
Thanked 1 Time in 1 Post
Default

Thanks, it worked!




Similar Threads
Thread Thread Starter Forum Replies Last Post
page 221 - problems with Monochrome and dark grey css sarala BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 April 16th, 2010 02:35 AM
CSS - editing the css style sheet doesn't take effect immediately sayo ASP.NET 3.5 Basics 6 March 13th, 2009 02:32 AM
CSS HELP:! CSS EXPANDIBLE BACKGROUND FOR TITLE phpuser2000 CSS Cascading Style Sheets 2 December 19th, 2007 12:36 AM
Rich's new CSS book: Beginning CSS 2nd Edition jminatel BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 0 June 15th, 2007 11:55 AM
i need help on this css lucian CSS Cascading Style Sheets 10 September 13th, 2005 06:15 AM





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