html - Strange behavior : display table + after pseudo-element -


i noticed strange phenomenon when apply :after pseudo-element on element display:table can see here : http://jsfiddle.net/rkznv/1/

the pseudo-element may behave table cell when should not.

do have idea? bug? thanks!

from mdn - ::after (:after)

the css :after pseudo-element matches virtual last child of selected element.

so .table:after matches virtual child of div.table, allowed behave table cell.

the behaviour changes, when replace display: table-cell; display: table-row;

http://jsfiddle.net/rkznv/2/


Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -