container width?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swift2013
    New Member
    • Aug 2007
    • 1

    container width?

    I have a paragraph which has width=200px and is contained in a div.
    The div is placed within the table cell, which has width=50px
    In IE6, Firefox 2.0.0.6 the div has offsetWidth of 200px,
    but ie7 renders it with 50px.

    How can i force ie7 to set div's width by its contents?

    <style>
    table.narrowTab le tr td {
    width: 50px;
    }
    p.wideParagraph {
    width: 200px;
    }
    </style>

    <table class="narrowTa ble">
    <tr>
    <td>
    <div id='container'>
    <p class="widePara graph">This paragraph </p>
    </div>
    </td>
    </tr>
    </table>

    test the page sample at http://swift-rt.narod.ru/divWidth.html
Working...