July 2002

07/29/2002 Monday

If an element has a clip CSS property assigned to it and the element's content extends beyond the clipping region, the extra content will be visually hidden but, in IE4.5 Mac and NS6.x PC (and maybe Mac), will interfer with mouse events. For instance, if an element that would normally be 100 pixels high is clipped so that only the top 50 pixels are visible, no links within 50 pixels of the bottom of the clipping region will be clickable unless they have a z-index that puts them above the clipped element (links with the same z-index but appearing later in the code should - and do in other browsers - have a higher apparent z-index and be clickable).
16:05 permalink

Using align="center" to center something within the browser window gives you different results in different browsers. IE and Mozilla center correctly and account for the presence of a vertical scrollbar (in IE PC, the vertical scrollbar is always present). In NS4.x PC, the centering calculation assumes that a vertical scrollbar is present even if it's not so that the centered object is 8 pixels to the left of center when there's no scrollbar. In NS4.x Mac, the centered object is always 10 pixels to the left regardless of whether there is a scrollbar present or not. Because of this weird unpredictability, don't use align="center" if positioning needs to be pixel-perfect - use Javascript to position elements dynamically based on the window width (window.js contains getWindowWidth() and getWindowHeight() functions that avoid cross-browser issues).
15:55 permalink

Back for a week between vacations. Spent 5 days last week hiking part of the Brazeau Loop in Jasper National Park. Saw cariboo, moose, deer, ptarmigan, hawk, and many, many mosquitos. Given my track record for posting photos on this site, pictures will not be forthcoming anytime soon. You can see someone else's photos of the trail instead.
15:45 permalink

07/19/2002 Friday

Mozillazine: Fully Scriptable Plugins for Mozilla. Many plugins were scriptable in NS3.x and 4.x under the LiveConnect architecture. Mozilla doesn't support LiveConnect and put in place a new architecture (XPConnect) that plugins needed to support in order to be scriptable. The new Flash 6 and Quicktime 6 plugins are the first to support this new architecture. Prior to Mozilla and NS6, Flash had been scriptable since Flash 2.0 in IE3+ (except on the Mac) and NS3+ so some people (particularly if they were coding for a PC audience) would have gotten used to using FSCommands or calling Flash methods from Javascript. The change in plugin architecture and the subsequent delay in support from plugin vendors has complicated issues. Before attempting to call Javascript from Flash or visa-versa, you need to check that the browser isn't Mozilla / NS6 running Flash 5 or lower (or IE Mac, as always). Or just author in Flash 6. The only Flash-Javascript communication that wasn't affected was calling Javascript from a getURL() using the javascript: protocol - that still works in Mozilla / NS6 regardless of Flash version.
09:50 permalink

07/18/2002 Thursday

Corners in CSS - one and two. (via Milov)
08:20 permalink

07/15/2002 Monday

NTKnow: Yahoo's list of forbidden words and tags in HTML email. Yahoo's email filters will convert words like eval to review, mocha to espresso to avoid cross-site scripting. Word boundaries aren't respected to retrieval becomes retrireview. The solution: don't use HTML email (or word your HTML emails very carefully) if your message is destined for Yahoo accounts. (via Camworld)
08:20 permalink

07/12/2002 Friday

Another big IE security problem: the embedded WebBrowser ActiveX control is not subject to cross-domain security. (via Metafilter)
08:40 permalink

07/11/2002 Thursday

Making a Restaurant Reservation
Hostess: Hi!
Me: Hi. Chris for four.
Hostess: Oh. Two Chris' in a row. Can I get your last name, too, please.
Me: Sure. It's "Nott". N-o-t-t.
Hostess: I'll just put "K", ok?
Me: Sure.
08:40 permalink

07/05/2002 Friday

In Mozilla, if you do a window.open() call and set scrollbars=no, you still get scrollbars if the content flows outside the window area. As noted in an old bug report for a related issue, you can avoid scrollbars from appearing by setting the overflow CSS property on the root node of documents that appear in the window.
16:40 permalink

IE doesn't support the abbr element. (via Epiphany)
16:05 permalink

A while ago, I did some research on Quicktime version detection. At the time, I believed you couldn't get the Quicktime version in IE PC. Turns out that you can. So I built some Quicktime detection scripts.
16:00 permalink

07/04/2002 Thursday

The following code attempts to append a child to the body of a document as it is being parsed:

<body>
<div>
<script>
document.body.appendChild(document.createElement('span'));
</script>
      

Because the div element wasn't terminated before I attempted to append a node after it, IE (5.5 and 6) reports the mysterious Internet Explorer cannot open the Internet site ... Operation aborted. The only mention of this error anywhere is from a Google cached version of an MSDN page (scroll down to the last question). Mozilla will handle the same code without a problem. It seems to append the span to the body element without terminating the div element - any code before the end </div> is still treated as being descendants of the div even if they appear after the script. To fix the problem in IE, either insert the new node earlier in the document (if possible) or wait until the current child has been closed correctly before appending the new child.
16:45 permalink

Gecko-based browsers set the display CSS property for images to a default inline. And the vertical-align property applies to inline elements and it's default value is baseline. So, unless you say otherwise, all images will have a gap of several pixels (the actual size depends on the font-size property for the containing block) below them. This gap is only really noticable (and unwanted) in situations where the image is used outside an inline context. Like when the image is used by itself in a table cell. To get rid of the gap, set the display to block or vertical-align to text-bottom - whatever seems appropriate for the situation. All of this has been mentioned before (many times on Webdesign-L, for instance). There is another situation where you'll run into the gap that is less obvious - in popup windows. If you size your popups to exactly fit an image, the gap will force a vertical scrollbar - maybe a horizontal one forced by the appearance of the vertical one - (unless you have these turned off).
11:40 permalink

In IE4.x and 5.0 on the Mac, windows created using window.open were sized wrong. A window without a status bar would be 2 pixels too short. If the window had a status bar, it would be 17 pixels too short. This appears to be fixed in IE5.1.
11:25 permalink

07/02/2002 Tuesday

Evolt: New DOCTYPE sniffing in upcoming Mozilla releases. The "almost standards" mode will not implement the CSS2 line-height rules that screw up some designs that use tables to layout images (a gap is added to the bottom of each image). The new mode will be triggered by HTML 4.01 and XHTML Transitional and Frameset doctypes.
09:20 permalink

Archives