Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.
Reply With Quote
  #2 (permalink)  
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.
Reply With Quote
  #3 (permalink)  
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;}
Reply With Quote
  #4 (permalink)  
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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:48 PM.


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