i am using this class for css clearfix on a div which has a calculated width of 0, but has content of width x in it.
.clearfix {
*zoom: 1;
&:before,
&:after {
display: table;
content: "";
}
&:after {
clear: both;
}
}
What is happening is that in chrome after i use this class, the div takes the width of its content. But in firefox, the div takes the width of its parent.
Shouldn't the behavior be that the div takes the width of its content in both browsers? What can be the issue?