Problem with table in Firefox

Discussion in 'HTML & Website Design' started by XandroZ, Nov 26, 2006.

  1. #1
    I have a problem with a table in Firefox 2.0.
    I have a div (Layer for Macromedia users), inside div is a table.Also in layer is text.I want the Text to wrap around the table.There is no problem in IE but Firefox not wrap the text around the table.Here is un example code:

    
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    #Layer1 {
    	position:absolute;
    	left:256px;
    	top:27px;
    	width:503px;
    	height:337px;
    	z-index:1;
    	background-color: #CCCCCC;
    }
    -->
    </style>
    </head>
    
    <body>
    <div id="Layer1">
    
      <table align="left" valign="top" width="335" height="276" border="1" cellpadding="0" cellspacing="0" bordercolor="#FF0000" bgcolor="#CCCCCC">
        <tr>
          <td>bla DSADASDASDAS</td>
        </tr>
      </table>
      <p>fdfffffffffffffffffffffffffffffffffffffffffffffffffffff<br />
      sadddddddddsssssssssssssssssssssss<br />
      dsssssssssssssssssssssssssss<br />
      dsssssssssssssssssssssssss<br />
      dddddddddddddddddddddddddddddddddddddd</p>
      <p >ffffffffffffffffffffffdsfdsfdsfds</p>
     
      
    </div>
    </body>
    </html>
    
    Code (markup):
     
    XandroZ, Nov 26, 2006 IP
  2. andrewjames

    andrewjames Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <td>bla DSADASDASDAS </td>
     
    andrewjames, Nov 26, 2006 IP
  3. XandroZ

    XandroZ Peon

    Messages:
    395
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no,that was a paste error
     
    XandroZ, Nov 26, 2006 IP
  4. olaf2

    olaf2 Active Member

    Messages:
    1,362
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #4
    you need to float the table...
     
    olaf2, Nov 26, 2006 IP
  5. XandroZ

    XandroZ Peon

    Messages:
    395
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    - i tried to float too, like for a image but is not working, the same problem
     
    XandroZ, Nov 26, 2006 IP
  6. olaf2

    olaf2 Active Member

    Messages:
    1,362
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #6
    float a div container an place the table inside the container...
     
    olaf2, Nov 26, 2006 IP
  7. XandroZ

    XandroZ Peon

    Messages:
    395
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I try that too but if you have un working example please point me to it
     
    XandroZ, Nov 26, 2006 IP
  8. olaf2

    olaf2 Active Member

    Messages:
    1,362
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #8
    what is the CSS code you're using for the floated div?
     
    olaf2, Nov 26, 2006 IP
  9. XandroZ

    XandroZ Peon

    Messages:
    395
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    html
    
    link href="demo.css" rel="stylesheet" type="text/css">
    </head>
    
    <body>
    <div id="Layer1" style="position:absolute; left:177px; top:85px; width:411px; height:273px; z-index:1; background-color: #FFFF00; layer-background-color: #FFFF00; border: 1px none #000000;">
      <div id="Layer2" style="position:relative; left:45px; top:108px; width:185px; height:151px; z-index:1; background-color: #00FFFF; layer-background-color: #00FFFF; border: 1px none #000000;" class="unnamed1">jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj</div>
      <p class="clear">this is the text to wrap bla bla bla bla bla </p>
    </div>
    
    Code (markup):
    I use clear to stop the next element moving up when I use float: like for a image.
    css
    
    unnamed1 {
        float: right;
    margin-left: 20px;
    margin-bottom: 6px;
    }
    .clear {
    clear: both;
    }
    Code (markup):
     
    XandroZ, Nov 26, 2006 IP
  10. olaf2

    olaf2 Active Member

    Messages:
    1,362
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    80
    #10
    place the code into classes and don't use inline styles and where is the table?
     
    olaf2, Nov 26, 2006 IP