Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS display:table; spacing issue on Chrome

I'm using display:table; on a divelement. On all other browsers I've tested there are no issues. However, on Chrome 22 (latest) and Canary, the div receives 1px spacing on both left and right sides.

Any idea where the problem lays?

EDIT:
margin,border,padding are all 0.

Also, any table properties are removed:

border-spacing:0;
border-collapse:collapse;
table-layout:fixed;
like image 386
Francisc Avatar asked Nov 02 '12 15:11

Francisc


2 Answers

I had the same problem. It was caused by Micro clearfix hack. Removed the .clearfix style solved the issue.

like image 139
noun Avatar answered Nov 06 '22 08:11

noun


I would also look at whitespace as a possible offender and test with font-size: 0.

like image 38
Henrik Avatar answered Nov 06 '22 08:11

Henrik