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 May 11th, 2006, 02:39 PM
Registered User
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 2 questions

First off great book so far. I am just beginning chapter 3, but I really like the writing to this point. Considering it's a technical subject, it has been very interesting and engaging.

Second, in the future, it would be helpful to organize these book forums by chapter, that way I wouldn't have to look through 4 pages of topics to see if this has already been posted. That's not a complaint, just a suggestion. :)

OK now my chapter 2 question. On page 34, Example 2-3 - I was wondering if the border-width: 0px; option does anything? I tried changing to different numbers, like 25px or 1000 px and nothing in the display changed.
 
Old May 11th, 2006, 02:52 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

You're right, that doesn't do anything.

I think my intention there was to emulate what was going on in the earlier HTML example, which started on page 25, where I added BORDER=0. That one doesn't do anything either, table borders are off by default. I think I added that attribute because I added BORDER=1 in the example on page 24, and probably reused the source code to build those examples.

So, point-in-case, it doesn't do anything. :-)

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old May 11th, 2006, 02:54 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I think that's a good idea for the forums, BTW.

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old May 11th, 2006, 03:35 PM
Registered User
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks!

 
Old May 11th, 2006, 03:37 PM
Registered User
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Also - when you say it (border) is off by default, do you turn it on with the "border: .... " tag?

 
Old May 11th, 2006, 05:17 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Yes, the border property can be used to place a border around the table, although the syntax is quite a bit different from the border HTML attribute. The border property is discussed in detail in Chapter 10.

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
 
Old May 12th, 2006, 12:20 PM
Registered User
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This comment does not seem to work:

p
{
    font-family: Arial;

}


while this one does

<!-- p
{
    font-family: Arial;
        font-size: 14pt;
}
-->

in the first one, the font remains at 14 pt. In the second one, the font switches to 10 pt which I have defined in the body tag.

 
Old May 12th, 2006, 12:27 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

You've confused where HTML comments are applicable. The HTML-style comments, e.g. may only appear in markup, not in style sheets or script. There's just one exception to that rule and that's when you're including *embedded* style sheets or scripts and want to hide those from older browsers (something almost no one does anymore since over 99% of all browsers in use today are CSS and JavaScript aware). There's an example of that in Chapter 3.

In Chapter 3 I also introduce CSS comment syntax, which you may use in style sheets. Using proper style sheet comments, your examples would look like this:

p
{
    font-family: Arial;
    /*font-size: 14pt;*/
}
/*p
{
    font-family: Arial;
    font-size: 14pt;
}
*/

Your second example works because the browser will skip over bits of CSS it doesn't understand or considers to be invalid.

HTH!

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html





Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Interview Questions, C# Interview Questions, dotnetuncle .NET Framework 2.0 4 June 22nd, 2019 07:03 AM
C++ questions jam93 C++ Programming 1 August 19th, 2007 10:39 PM
Ch. 4 & Ch. 12 athena BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 23rd, 2004 10:54 AM
C# questions zhenliu C# 1 April 15th, 2004 09:18 AM
Please go through this questions phpsharma PHP How-To 0 November 4th, 2003 03:26 AM





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