Forum Moderators: not2easy

Message Too Old, No Replies

Problem with left margin on right floating box

MSIE bug?

         

nn4l

9:46 am on Dec 10, 2003 (gmt 0)

10+ Year Member



I want to specify a right aligned box with a margin between the text and the box. The following code works with Mozilla, but not with MSIE:

<table style="float: right; margin-left: 50px"><tr><td>My Cell</td></tr></table>
text text text ...

MSIE displays it like this (replace the dots with spaces):


..........text text text -----------
text text text text text ¦ My Cell ¦
text text text text text -----------

But Mozilla 1.5 displays it like this (which is what I want):


text text text text text -----------
text text text text text ¦ My Cell ¦
text text text text text -----------

The extra left gap in the MSIE text is 50 px. What is wrong here?

nn4l

3:42 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



someone pointed me to a workaround:

the text must be put in <p> or <div>:


<table style="float: right; margin-left: 50px"><tr><td>My Cell</td></tr></table>
<p>text text text ... </p>

DrDoc

4:10 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

Glad you were able to solve the problem.