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 31st, 2006, 02:37 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default I am restricted to IE 6

Unfortunately, my user community is to a very great extent limited to the IE6 browser. While Mozilla, Opera, Safari are nicer I'm sure, my real world user base is almost exclusively IE6, flaws and all. So that's the environment I have to develop for.
That said, except for classes and id's, much of Chapter 5 is not applicable for me. Now I am trying to see what is in Chapter 6 that I might employ for IE5.5/6 users only.

I note that in Ch 6,page 108, under "::first-letter..." it lists IE5.5, IE6 as "supported". Either I am doing something wrong or IE6 is *not* supported. Anyone get the double colon specifications on this page to work?

I am using: Win XP SP2, VWD Express as my development IDE, both the built-in VWD browser as well as IE 6.0. I generally prefer a separate CSS but both linking to one, as well as using an in-line <style> block in the html, result is *not( showing the first letter and first line as in the Try It Out on page 109/110. That is, it's as though the double colon stuff was not there.

Here's my code:
---------------------------------------------------------------------------------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
    <head>

        <title >Working project</title>
        <style type="text/css" media="all">
            * {font-family: Sans-Serif; }
            p::first-letter{font-size:200%; background-color:Gray; border: 1px solid black; }
            p::first-line{letter-spacing: 5px; }
        </style>
    </head>
    <body>
        <form>
            <p>
                You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat.
            </p>
        </form>
    </body>
</html>
---------------------------------------------------------------------------------------
Please let me know if I'm making a silly error and that you can get the double colon stuff working using IE6. Thanks.

VV

 
Old March 31st, 2006, 03:44 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

The double colon syntax has always worked for me in IE.

Also, before forsaking advanced selectors entirely, see Chapter 18.

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 31st, 2006, 03:46 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

BTW, double colons are CSS 3, so you can get away with continuing to use CSS 2 single colon syntax for pseudo-elements. However, I know this to work in IE6 (I'm on a Mac so I can't check your source code).

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 31st, 2006, 04:06 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rich:
Thanks for the replies. I am still unable to get double colons working. Pseudo classes using single quotes are working fine. I'll recheck Ch. 18 (for the 3rd time) on what you have to say regarding doubles.
VV.


 
Old March 31st, 2006, 04:24 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Works for me, although I cleaned up the code a bit before testing it.

http://www.smilingsouls.net/doublecolon.png

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title >Working project</title>
        <style type="text/css" media="all">
            p::first-letter {
                font-size:200%;
                background-color: gray;
                border: 1px solid black;
            }
            p::first-line {
                letter-spacing: 5px;
            }
        </style>
    </head>
    <body>
        <form>
            <p>
                You see, wire telegraph is a kind of a very, very long cat.  You pull his tail in New York
                and his head is meowing in Los Angeles.  Do you understand this?  And radio operates exactly
                the same way: you send signals here, they receive them there.  The only difference is that
                there is no cat.
            </p>
        </form>
    </body>
</html>
With regards to Chapter 18, I was referring to your statement "much of Chapter 5 is not applicable for me".

HTH!

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 31st, 2006, 06:51 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rich:

Thanks for sticking with the problem. I have found the solution to this problem.

By coincidence your code (which works) contains one blank in a certain spot and my code does not. I believe this is a parse bug in the compiler.

Frequently I do not put blank spaces in my code. This is a hold over from my mainframe days where every byte of space was conserved, even in source code.

The first code block below will cause the double colons to fail, whereas the code block below that works because there is at least one blank between the endng "r" in "first-letter" and the next character, an open brace.

Same thing on the next line. At least one space is required between the ending "e"
in "first-line" and the next character, an open brace.

I note that pseudo code requiring only one colon does not have this blank space need.

Does not work***
p::first-letter{font-size:200%;background-color:Gray;border:1px solid black;}
p::first-line{letter-spacing:5px;}

Works***
p::first-letter {font-size:200%;background-color:Gray;border:1px solid black;}
p::first-line {letter-spacing:5px;}

As far as Ch 18 goes -- I have read it again. It pretty much requires installing IE7 --
something I am not willing to do. IE7 removes and replaces IE6, and the two cannot coexist. I have to develop for my user community who will be using IE6 for a while yet. I myself have no problem in migrating to a new browser, it's just that my users are not as quick to move to the latest software.

But, whatever. Thanks for a great book and your help. I'm still in Ch 6 and will eventually complete it.

VV




 
Old March 31st, 2006, 08:10 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> As far as Ch 18 goes -- I have read it again. It pretty much requires installing IE7 --
> something I am not willing to do. IE7 removes and replaces IE6, and the two cannot coexist.

I think you've misunderstood what's being presented in chapter 18. "IE7" is the name of an open source project written in JavaScript, a programming language which executes within a web browser. The developer of this JavaScript, Dean Edwards, choose this name because at the time Microsoft wasn't going to be releasing the real IE7 (the actual browser) until the release of Vista, and at the time Microsoft had also stated that IE7 would only be available on Vista. Of course, Microsoft has since recanted and there will be an IE7 before Vista, which will also be available for users of Windows XP Service Pack 2, Server 2003, and XP 64 bit in addition to Vista. The name "IE7" is supposed to represent what developer's expect to be in the real browser.

So the solution that I present in Chapter 18 is not a browser. It doesn't replace IE6, it is JavaScript which is executed within IE6 (in addition to IE 5 and 5.5). The JavaScript reads your style sheet and looks for bits of CSS that Internet Explorer doesn't support natively and provides compatibility with those bits. You can read more about it, and what it supports on the developer's website at http://dean.edwards.name . The developer is aware of the confusion of the name "IE7" with the real Microsoft browser and has stated that he will eventually rename his JavaScript to something less confusing.

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 31st, 2006, 08:41 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rich:

Thanks for your reply. You are right, I assumed Dean Richard's IE7 would replace IE6. I'm sure Dean's got a pretty nice piece of code there since you endorse is so highly.

However, the situation many developers are in, as am I, is that Microsoft dominates today's software world with their IE6 browser. However fine Mozilla and IE7 and the rest of them are, I've got to make pages and code for the masses who use plain vanilla IE6. That's my bread and butter.

My bottom line is this: I'm not interested in getting better bells and whistles with other browsers or software right now, because the majority of my clients would not be able to see them. Comes the day Microsoft comes out with all the neat stuff already present in Mozilla, Opera, IE7, for their plain vanilla default browser, I'll be first in line to upgrade my pages with all the new functionality.

Regards,
VV





 
Old March 31st, 2006, 09:17 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Victor, you've totally lost the point of IE7. Your users don't have to do anything, install anything, upgrade, bark at the moon, nothing, nada. It's software that you include directly in your web page that loads /automatically/ in plain ole IE6 when your users load up your website. There is nothing extra to install or do, save for you the developer to include a couple lines of JavaScript in the HTML source. It's an ingenius solution that lets every web developer develop using the CSS standards that IE6 doesn't support today, here and now without worrying one iota about compatibility, their users upgrading, or anything else.

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 31st, 2006, 11:27 PM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rich:

OK. You got thru -- finally. I'm going to scrutinize this IE7 and see. Thanks much for bearing with me.

VV










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