开发者

getting text to wrap around flash player / onject

i use a bit of code to insert a small soundcloud player inside a wrapper div

my problem is i cant seem to get the object/player to float left so text will wrap around it.. as u can see ive tried adding a class to it but this doesnt seem to work.. can some1 help ?

in my php file i got

    } elseif (!empty($track)){
     echo "<object class='track' height='18' width='250'> <param name='movie' value='http://player.soundcloud.com/player.swf?url=" . $track . "&amp;show_comments=false&amp;auto_play=false&amp;player_type=tiny&amp;color=ff7700'></param> <param name='allowscriptaccess' value='always'></param> <embed allowscriptaccess='always' height='18' src='http://player.soundcloud.com/player.swf?url=" . $track . "&amp;show_comments=fa开发者_运维问答lse&amp;auto_play=false&amp;player_type=tiny&amp;color=ff7700' type='application/x-shockwave-flash' width='250'></embed> </object>";
}

and in my css file i got

    .track {float: left; margin-right: 5px;}


You're floating the object. Try floating the wrapper div instead?


Try floating the wrapper div (not the object itself) and give it a width.

Markup:

<div class="track-wrapper">
  <object class="track" width="250" ... />
</div>

CSS:

.track-wrapper {
  float: left;
  width: 250px;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜