开发者

Why is a CITE tag not observing the following properties?

开发者 https://www.devze.com 2023-04-12 02:01 出处:网络
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; w开发者_StackOverflow中文版idth: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100px;
w开发者_StackOverflow中文版idth: 100px;

http://jsfiddle.net/bhellman1/qQdDq/

white-space is taking effect, but width is not? Why? Is it something to do with the CITE tag or perhaps Chrome?


cite is an inline element, so you have to specify display: block or display: inline-block for it to be constrained to width.


<cite> is inline, it doesn't have width. if you add display:block or display:inline-block, on the other hand...

0

精彩评论

暂无评论...
验证码 换一张
取 消