Skip to content Skip to sidebar Skip to footer

Animate Div Width Styled As Table-cell

I've created 2 columns. The 2nd is 240px wide and the 1st takes all available width. The below displays fine in IE8 & FF3.6: /*My Styles*/ div.table { display:table; border-col

Solution 1:

I believe I've got a work around. For some reason animating maxWidth instead of width works.

So:

<div id="wfCol" class="cell" style="width:240px; max-width:240px">
        <div id="ulWF" class="tblWrap" style="width:240px">
            <%=DashboardController.GetWorkflowString()%>
        </div>
    </div>

and

$wfCol.animate({ maxWidth: 0 });

Works... Wierd but I'll take it :)

Solution 2:

Just remove the 100% width delcaration, the <div> will expand to the width by default and not give the behavior you're talking about:

div.table { display:table; border-collapse: collapse; table-layout:fixed; border-spacing:0; padding:0; margin:0;}

Post a Comment for "Animate Div Width Styled As Table-cell"