Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 23rd, 2005, 03:35 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Fairfield, Iowa, USA.
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
  #2 (permalink)  
Old March 23rd, 2005, 09:19 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
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
  #3 (permalink)  
Old March 23rd, 2005, 10:53 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Fairfield, Iowa, USA.
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank u.

Christian
  #4 (permalink)  
Old March 23rd, 2005, 11:12 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
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
  #5 (permalink)  
Old March 23rd, 2005, 03:13 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Fairfield, Iowa, USA.
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for clearing it up. You are GREAT!

Christian
 


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



All times are GMT -4. The time now is 07:38 AM.


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