Archive for February, 2009

CSS: Weird margin-top CSS bug? I think?

Friday, February 27th, 2009

I having been hitting a weird and annoying CSS bug (I think)
HTML

  <div id="header">
    <div id="title">My Lawyer.com</div>
  </div>

CSS

#title{
  margin-top: 10px;
}

Then, somehow, the margin-top of 10px get assigned to the #header div?

Now, the weird thing, is that if I add any text (i.e &nbsp;) just before the #title div class, then, the margin-top get appropriately assign to the #title div???

Now, even weirder, same behavior on Firefox 3.0.1, Google Chrome, and Safari????

Here is another example

The Blue box should be just below
  <div style="margin-top:0px;background-color:blue;width:50px;height:50px">
    <div style="margin-top:20px;background-color:red;width:10px;height:10px">
    </div>
  </div>

The Blue box should be just below this text (but it is 20 px down) and the red box should be 20px down the blue box, but it is 0px.

Any help greatly appreciated. Easy to work around, but kind of annoying.

OpenWeb: Web-Based HTML Editors

Wednesday, February 11th, 2009

Here are few Web-Based HTML editors I found (HTML-Area seems to not be maintained anymore)

OpenWeb: When IE, Firefox, Chrome will fully support PNG, SVG, CSS3, SVG, Fonts, …

Wednesday, February 11th, 2009

When can I use…

Apache: htpasswd Create User for Apache Auth File

Sunday, February 8th, 2009

First user creation (create file and first user):

htpasswd -cm /path/to/auth-conf yourusername

Subsequent user creation

htpasswd -m /path/to/auth-conf yourusername

jQuery: MouseOver Event Binding and Input Value Retrieval

Thursday, February 5th, 2009

Grabbing an input value from a HTML list on mouseover:

<ul id="toyList">
  <li>Car <input id="toyId" value="123" /></li>
  <li>Snowplow <input id="toyId" value="432" /> </li>
  <li>Carcarrier <input id="toyId" value="234" /> </li>
</ul>
<script type="text/javascript">
$(document).ready(function() {
 $("#toyList li").bind("mouseover",function(e){
   alert("over element: " + $(this).children("input['toyId']").attr("value"));
 });
});
</script>

See also:
jQuery Bind (use jQuery Live if the list change dynamically)

OpenWeb: SVG in Flash

Thursday, February 5th, 2009

SGWeb Google project implementing SVG in a Flash player (currently 25k).

OpenWeb: XForms Implementations

Thursday, February 5th, 2009

W3C XForms Implementation link

Some interesting ones:

  • Orbeon: Seems to be a solid, skinnable, HTML/AJAX implementation of Xforms.
  • AJAXForms: AJAXForms is a tool that transforms XHTML/XForms documents (at compile/design time) to HTML with Javascript documents.
  • Chiba Web 3.0: Chiba Web 3 isĀ  release of the Chiba server-side XForms implementation, coming with a brand new JavaScript layer, improved XForms 1.1 support, localisation, XPath 2.0 and more. Chiba is now using Dojo Toolkit Version 1.2.3 (latest) which vastly improves the quality of the UI.

web2.0: Google Apps Standard Edition

Monday, February 2nd, 2009

It’s getting harder and harder to find the Google Apps Standard Edition registration page. The default link point to the premium edition. Anyway, if you click on “Compare Editions” you get to the page with both editions:

http://www.google.com/apps/intl/en/business/editions.html