开发者

How can I get an embedded video to float left in IE7?

开发者 https://www.devze.com 2022-12-18 19:46 出处:网络
How can I get an embedded video to float left in IE7? The following code works great in FireFox and the text wraps around the floated div and video, but in IE7 the text sits under the div/video.

How can I get an embedded video to float left in IE7? The following code works great in FireFox and the text wraps around the floated div and video, but in IE7 the text sits under the div/video.

<object height="264" width="320" style="float: left; margin: 5px;"><param name="wmode" value="transparent"><param name="AllowFullScreen" value="true" /><embed type="application/x-shockwave-flash" src="http://somevideo.com/" AllowFullScreen="true" allowScriptAccess="always" height="264" wmode="transparent" width="320"></embed></object>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum auctor sapien vel sem fermentum faucibus. Suspendisse bibendum vulputate dolor non pellentesque. Donec ornare condimentum purus eget fringilla. Ut hendrerit neque vitae velit rhoncus ac pulvinar dui pretium. Morbi rutrum mauris vitae quam ultricies molestie. Cr开发者_开发问答as lorem est, placerat eu dictum ut, faucibus sed neque.</p>


IE only uses the embed tag, it ignores the object tag.

Put it inside a div element, specify the same size for it, and set the float and margin on the div instead.

Alternatively, add the style both to the object and embed tags, but that might not work well if some browsers use both styles so that you get double margins.

0

精彩评论

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

关注公众号