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 February 8th, 2006, 02:28 AM
Registered User
 
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Example 5-3 (indentation issue)

I've typed in Example 5-3 as closely as possible, but I got slightly different results from your downloadable example. After poring through your code & mine, I've finally figured out what the problem was, but it was a serious mind-bender for a beginner like me, and I thought I should mention it. In your book, there is a section which is printed like this:
Code:
<div>
    <label for='feedback[address]'>Address:</label>
    <textarea name='feedback[address]' 
              cols='40' rows='3' wrap='virtual'>
    </textarea>
</div>
<div>
    <label for='feedback[message]'>Comments:</label>
    <textarea name='feedback[message]'
              cols='40' rows='6' wrap='virtual'>
    </textarea>
</div>
Well, I typed it in just like this, and I noticed that when I clicked in the comment area, my cursor was indented about an inch from the left. So then I tried this:
Code:
<div>
    <label for='feedback[address]'>Address:</label>
    <textarea name='feedback[address]' cols='40' rows='3' wrap='virtual'>
    </textarea>
</div>
<div>
    <label for='feedback[message]'>Comments:</label>
    <textarea name='feedback[message]' cols='40' rows='6' wrap='virtual'>
    </textarea>
</div>
<div>
No difference. I looked and looked at your downloadable example code, trying to figure out what I was missing. The formatting of the blank space in the code shouldn't matter, right? But yours was different, and it rendered without the extra space in the text field. Your downloadable example looks like this:
Code:
<div>
    <label for='feedback[address]'>Address:</label>
    <textarea name='feedback[address]' cols='40' rows='3' wrap='virtual'></textarea>
</div>
<div>
    <label for='feedback[message]'>Comments:</label>
    <textarea name='feedback[message]' cols='40' rows='6' wrap='virtual'></textarea>
</div>
I finally, finally figured out that the web browser was rendering the indentation before
Code:
</textarea>
as a series of 'space' characters inside the text field. You fixed it in your downloadable example, but made no mention of this potential pitfall in your book. I'd suggest making a note of this in the next edition, and correcting your printed example.

 
Old February 8th, 2006, 09:47 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Sorry for all the trouble. I've even been stumped by that more than once myself. We'll add a note to the errata about that. What more than likely happened was the code was reformatted for print to prevent the line from wrapping and the code becoming unreadable, which is why the download and the print versions differ.

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Com issue(really urgent) balesh.mind ASP.NET 2.0 Professional 2 May 14th, 2008 03:35 AM
Drop Down Issue SKhna ASP.NET 2.0 Basics 1 March 19th, 2008 06:29 AM
reorganise indentation deadrabit Visual C++ 0 September 9th, 2007 09:36 AM
Issue with DTD tgopal CSS Cascading Style Sheets 2 September 20th, 2006 04:15 AM
Another issue islandtiu BOOK: Beginning ASP 3.0 1 February 14th, 2005 11:49 AM





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