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

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -