开发者

I have a <div> that moves an element on the page instead of increase it's size, how do I fix this?

I have a YouTube video inside of a <div> on my web page. When I Ctrl+ (increase text size), it moves around on the page instead of simply increasing it's size like all of my other <divs>开发者_运维百科 do...what are some of the reasons for this?


This usually happens when you use pixels to size your elements. Some browsers just 'zoom in', giving no problems. Others (like IE) increase sizes of elements, but then 15 pixels will always be 15 pixels. Try setting sizes in percentages or em's.

  • http://kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/

(most of what's being said about font sizes applies to other elements as well)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜