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.
精彩评论