开发者

unwrap element does not copy dimensions to parent element

I'm unwrapping an href around an image. The image has certain dimensions, the href has the dimensions taken from the image including the padding. When I perform the unwrap, the parent div doesn't get 开发者_JAVA百科the dimensions from the new direct child (img) and the layout is screwed. What can I do?

regards, Jeroen


Make the parent a <span> and give it a display: block; property. This should adjust to the dimensions to what's inside it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜