I'm trying to apply an inline-block style to an element (a div to be specific). And in order to achieve this in IE you have to use a hack:
$('#element').css(
{
'display' : 'inline-block', //applies inline-block to matched elements in all browsers except IE due to hasLayout bug
'zoom' : 1, //set hasLayout to 'true' in IE
'*display' : 'inline' //use asterisk to only apply 'inline' style to IE
}
);
However, the css() function seems to present the style to the browser such that '*display' doesn't register in IE and so therefore doesn't apply the 'inline' style.
Any ideas on why and/or how to work around this?
Thanks in advance!