 |
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
|
|
|
|

March 14th, 2011, 08:18 AM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 25
Thanks: 2
Thanked 1 Time in 1 Post
|
|
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.
|
|

March 15th, 2011, 10:16 PM
|
|
Authorized User
|
|
Join Date: Sep 2010
Posts: 19
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
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.
|
|

March 19th, 2011, 03:40 PM
|
|
Registered User
|
|
Join Date: Feb 2011
Posts: 6
Thanks: 2
Thanked 1 Time in 1 Post
|
|
Code:
ul ul {
list-style:square;
width:220px;}
Should be:
Code:
ul
{list-style-type:square;
width:220px;}
|
|

March 22nd, 2011, 09:49 AM
|
|
Authorized User
|
|
Join Date: Feb 2011
Posts: 25
Thanks: 2
Thanked 1 Time in 1 Post
|
|
Thanks, it worked!
|
|
 |