Wrox Programmer Forums
|
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 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 23rd, 2005, 03:35 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default A couple of questions:

First of all, I would like to say this is an awesome book, I love it and I recommended it to all my friends. I have read up to page 119 and I have a couple of questions.
First Question:
On page 117
the last two rules are:

li a:active{
background-color: lightgray;
color: black;
}
li a:hover, li a:focus{
background-color: gray;
color: white;
}
because of the order on which they are the style for the :active pseudo class will actually never show because the :hover will overrule it, is it suppose to be?:
li a:hover, li a:focus{
background-color: gray;
color: white;
}
li a:active{
background-color: lightgray;
color: black;
}
Second Question:
On page 117, there is this rule:
li {
border: 1px solid black;
padding: 5px;
margin: 2px;
float: left;
}
the part I am wondering about is "float: left".
It seems to have almost the same effect as:
"display: inline"
would u mind explaining the difference between them? Maybe once I continue reading my question will be answered, but if u could spare a couple of minutes I would really appreciate it.


Thanks so much

Christian
__________________
Christian
 
Old March 23rd, 2005, 09:19 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

In answer to your first question:

I beleive that is in fact wrong. Dynamic pseudo-classes should go in the order :link, :visited, :focus, :hover and :active. So that may very well be an error in the book. I'll look at it later to confirm.

Second question, no float: left isn't the same as display: inline. You can read about floats in chapter 11 and I believe the inline box model is also discussed in that chapter. Floating elements are unique beasts with their own set of idiosynracies (which I won't attempt to explain here), and inline elements are elements like <a>, <span>, <i>, <b> and [u].

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old March 23rd, 2005, 10:53 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank u.

Christian
 
Old March 23rd, 2005, 11:12 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

No problem. That was an error in the book, there was also an error on the previous page, 116, the LoVe HAte mnemonic device including the :focus pseudo-class should be LoVe For HAte, where the order is :link, :visited, :focus, :hover, and :active. I incorrectly stated that the :focus psuedo-class should be applied last.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old March 23rd, 2005, 03:13 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for clearing it up. You are GREAT!

Christian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Couple Errors on AddEditArticles page pinch BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 13 December 14th, 2007 04:01 AM
Couple questions about embedding values into html warhero XSLT 2 July 3rd, 2007 03:06 PM
New to XML. Have a couple basic questions sswingle XML 2 April 22nd, 2006 07:13 AM
a couple of problems... please help! Spaceman Spiff Access 6 March 24th, 2004 12:23 PM





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