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

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

May 11th, 2006, 02:52 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
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
|
|

May 11th, 2006, 02:54 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
|
|

May 11th, 2006, 03:35 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks!
|
|

May 11th, 2006, 03:37 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Also - when you say it (border) is off by default, do you turn it on with the "border: .... " tag?
|
|

May 12th, 2006, 12:20 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

May 12th, 2006, 12:27 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
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
|
|
 |