Geeks With Blogs
Doug Butscher Nothin' but .NET!
This may be old news for some, but Firefox v2.0 does not support the display style "inline-block". I've read several blogs and articles on the subject, most of them suggesting using "-moz-inline-block" or "-moz-inline-stack" or "-moz-inline-box", none of which worked (and also managed to break IE support, subsequently).

Since I tend to fix my own problems (and quickly forget the solution when it creeps up again), I usually post a blog about it to remind myself in the future. In the event this blog helps anyone else out there, then gravy.

Turns out, "inline" works just fine and dandy. I should clarify a bit about the specific nature of my implementation. As the website I am working on is still written in ASP.NET 1.1, I can't use the cool new AJAX functionality. As a result, I've been forced into mixing ASP.NET and HTML controls on my pages, and accessing them through JavaScript.

I essentially wanted a checkbox that, when toggled, would hide and/or display a set of address controls.
The code looks like this:

function USHORAddress()
    if (Form1.chkUSHORAddress.checked)
            document.getElementById(" <%= lblHORCity.ClientID %>l").style.display = "inline";
            //document.getElementById(" <%= lblHORCity.ClientID %>").style.display = "-moz-inline-block";
            //document.getElementById(" <%= lblHORCity.ClientID %>").style.display = "-moz-inline-stack";
            //document.getElementById(" <%= lblHORCity.ClientID %>").style.display = "-moz-inline-box";
            document.getElementById(" <%= lblHORCity.ClientID %>").style.display = "none";

Let me know if this helps anyone!

Doug Posted on Friday, January 4, 2008 3:19 PM | Back to top

Comments on this post: Firefox and "inline-block" support

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Doug Butscher | Powered by: