After sending this I realized I was AMAZINGLY unclear on the first
paragraph.  What I should have said was something like this :

"IE has some parsing bugs that can make this easier.  For example, if
you use a // for a one-line comment (a syntax that CSS does NOT
support), IE will read the slashes, and then continue to read
whatever's behind it.  Mozilla (including FF) will properly ignore the
entire line as invalid.  So you can specify the standards-compliant
style value, and then specify an IE-only one behind double slashes:"

Sorry for the confusion.

cheers,
barneyb


On Sun, 12 Dec 2004 21:27:45 -0800, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> There are a few CSS parsing bugs that are unique to IE as well.  You
> can use those to easily specify both dimensions.  For example, IE will
> transparently ignore // "comment" in stylesheets, while Mozilla
> correctly recognizes the invalid syntax and ignores through the end of
> the rule.  That lets you do things like this:
> 
> #mydiv {
>   width: 50px;
>   border: 1px solid #f90;
>   padding: 3px;
>   margin: 0px;
>   // width: 58px;
> }
> 
> Now the "mydiv" box will appear the same width on both IE and FF (50
> pixel content area, 58 pixels to the outside of the borders).  There
> is also a hack termed the "box model hack" that a google search should
> turn up quite easily.
> 
> To return to the discussion (read: flame war) of a few days ago, this
> is a good example of developing compliant code, and then tweaking it
> for IE's discrepancies.  In other words, I deal with the first four
> lines of that style block, and then when I'm finished with everything,
> fire it up and IE and see what bits of hackery I need to add (the
> fifth line).  In general, there aren't very many unless you'd doing
> pretty complicated layout stuff that requires pixel perfection.
> 
> cheers,
> barneyb


-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187324
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to