Item List Grid : Real world practice with display:inline block across browsers

one of my co-workers asked the way to deploy grid-like layout for list-item with nice alignment and visual treatment.
Apparently a more flexible design and layout will make this better and old school CSS solution such as “float:left” won’thelp in the case.

I had a very simple prototype on :
http://www.hedgerwow.com/360/dhtml/css-inline-block-layout.php

you may try to adjust the font-size, window-size and see how this fluid layout adjust to your best-view-size and still keeps the UI looks nice and aligned well.

BTW, in case you may not notice the very inconvenient truth. Some might think that block Element s such as DIV does not get display:inline-block on Internet Explorer. This may not be true.

Here’s how do I implement display:inline-block across browsers:
‹style›
div{

width:100px;
height:100px;
background:red;
margin:1px;

display:-moz-inline-stack;/*Firefox need this to simulate display:inline-block*/
display:inline-block; /*IE does not apply this to Block Element, and Firefox does not render this, too*/
_overflow:hidden;/*fix IE6 to expanded content*/
zoom:1;/*trigger hasLayout*/
*display:inline;/*once hasLayout is true, set display:inline to block element will make display:inline behave like display:inline-block*/
}

‹/style›

‹div›1‹/div›
‹div›2‹/div›

CSS
layout
UI

Comments (4)

Permalink

display list item as grid and make vertical-align:middle work

One of the layout which designers love most and developers hate most is something looks like this:
http://www.hedgerwow.com/360/dhtml/css-layout-gridview.html

No time for documentation, just keep it simple for future usage.

CSS
layout

Comments (0)

Permalink

Browser Detection, Detecting IE7 via Object Detection

It’s better than checking window.XmlHttpRequest :-D
( and I thought I should have finished this article in two lines instead of explaining it)

http://www.hedgerwow.com/360/dhtml/dom-detect-ie7.html

DOM
IE only
Browser Detection

Comments (2)

Permalink

HTML 2.0 Browser Detection

Or attack?
http://www.hedgerwow.com/360/dhtml/html-browser-detection.html

Security
HTML
Browser Detection

Comments (1)

Permalink

oncontentready : An alternative to simulate oncontentready on Internet Explorer

Detecting Element.outerHTML  periodically to see if an Element is fully parsed and avoid Operation Abort Error.
http://www.hedgerwow.com/360/dhtml/ie-dom-oncontentready/doc.php

JavaScript
DOM
IE only

Comments (5)

Permalink

Import Javascript into CSS for IE6

So much love & hate for IE6 :-P

http://www.hedgerwow.com/360/dhtml/ie6-css-hack-import-js.html

JavaScript
CSS Hack
CSS
IE only

Comments (2)

Permalink

KISS Rules

There’s something about this blog but web development.

I don’t think that I have many readers of this blog based on the available statistical data.
Just like I did not spend so much time on blogging about my life or thoughts here since I tend be as lazy as I can.
I wrote crappy codes here, in my prototypes and always write poor documentation, too.
As a reader, you may notice that many of my examples are actually well implemented or explained, and it’s not tested or decorated with what so call web 2.0 style round corners.
Every time when I proposed one “solution”, you might instantly realized that there’s some limitations or side effects coming along with it.

The fact is that those problems never bother me just like I never want to have my own blog until just few months ago. I gave up my Yahoo! 360 Blog even though I did have some great time on that platform.

So to save my time here, I just changed the sub-title of my blog from “Hacking Web standard” to “Keep It Simple, Stupid”, which means:

  1. It’s really great to share ideas and thoughts with the whole web-devel world.
  2. View Source, not just documentation, if you have problem withmy crappy codes.
  3. Never copy & paste the CSS / JS / HTML, those codes are written for concept of proof, not for production.
  4. Fix the codes if you has issues with it, and I’d love to know the solution if you have found something new or interesting.

Thanks.

BTW, I found this interesting blog accidentally, but no one ever contributed any contents unfortunately.

Kiss, Hedger

Blog

Comments (11)

Permalink

IEContentLoaded:An alternative for DOMContentLoaded on Internet Explorer

A little step forward.

http://www.hedgerwow.com/360/dhtml/ie-dom-ondocumentready.html

DOM
IE only
Dom Event

Comments (2)

Permalink

Find & replace URL with HTML links

handy!

http://www.hedgerwow.com/360/dhtml/dom-replace-url.html

DOM
UI

Comments (1)

Permalink

get the XHTML of an Element

Feel safer to get XHTML instead of innerHTML from an Element
http://www.hedgerwow.com/360/dhtml/dom-getxhtml.html

DOM
XML
XHTML

Comments (2)

Permalink