# Getting an object to float and have text appear next to it... Works in FF, but not IE



## matt.choules (Sep 12, 2003)

Hi Everyone,

I'm at the very end of designing a website for my boss and I am hitting a brick wall with what should be rather simple...

I am slowly replacing iamges of case studies with embedded video (thank you vimeo!).
The floated images behave well in FF (2&3) and IE (6&7), allowing the text to appear next to it, but the video objects force the text onto a return line in IE7 and gets mixed into the paragraph below in IE6...

Attached is a zip file with the CSS, XHTML and images....

Please help!


----------



## tomdkat (May 6, 2006)

Ok, try doing this:

```
<div id="video1">

[b]<div class="video-object">[/b]
<object height="160" width="200"> <param name="allowfullscreen" value="false" /> <param name="allowscriptaccess" value="always" /> <param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1535580&amp;server=www.vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=0" />
<embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1535580&amp;server=www.vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=0" type="application/x-shockwave-flash" allowfullscreen="false" allowscriptaccess="always" height="160" width="200">
</object>
[b]</div>[/b]

<div id="video1text">
<p> Case Study 1: <br />
Northallerton Retirement Home. <br />
<br />
This case study will show you how Digi Construct can be used to aid
planning applications. </p>
</div>

</div>
```
Here is the style:

```
.video-object {
  display: block;
  width: 200px;
  height: 160px;
  float: left;
}
```
See what that does for you.  Basically, I put the object element in a DIV with the desired attributes and I floated that DIV. You will need to adjust some padding or margins but that should be easy for you to figure out. 

Peace...


----------



## matt.choules (Sep 12, 2003)

Hey tomdkat, 
Its been a few weeks since you last helped me...
^_^

That seems to work fine with IE6, but is a bit off on FF.
I'm going to try playing with the padding and see if I can fix it.


----------



## matt.choules (Sep 12, 2003)

Lovely!

That worked nicely.
They both clear them fine now.

Although I may be nit picking, but the objects are floating furthur to the left on the IE page than the FF page. I can live with that though.


----------



## tomdkat (May 6, 2006)

Great! Depending on the specific changes you made, you might be able to control the IE float by using a conditional include of an IE specific style.

What did you end up doing?

Peace...


----------



## matt.choules (Sep 12, 2003)

Here is the zip of the working page...


----------

