Login Register

dojoVAlign or dojoVerticalAlign CSS or even a wrapper class that would apply CSS to center elements in it

Is there any dojo CSS that will vertically align block level element to the center of their parent. I have three elements in a parent that are all different sizes and I need them to be vertically aligned in the parent. I've always found vertical alignment to be the worst sort of hack. I think if there isn't one making one in dojo would be useful at least there would be a "standard" that we could use and it could change under the covers as the browsers got better at handling it. I'd even take the best hack someone has for this if there isn't a dojo solution.

I was thinking of something like dojoVAlign CSS selector or I guess maybe even a wrapper dijit class that could be applied like dojo.dnd.Source is. For now it might just be added and calculates the CSS using marginBox etc. and slowly it would shrink to the point that it was just CSS as the browsers improved.

Thanks