Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to turn an HTML table into a list in Internet Explorer
    primarykey
    data
    text
    <p>I have a dynamically generated table in my page, which was generated by a 3rd party source (its an MLS feed) with 10 rows, 5 columns. I can't request much else. I want to display it as ONE column, hence, like a list. I have managed to do this on Firefox, Safari, and Chrome, but when I work with it in IE, the two effects I get are: each TD element in each row overlaps like a hand of cards in poker while maintaining the TR spacing - OR - it will stack the TDs AND the TRs all into one pile of IE crap. Finally, nothing I do in CSS seems to change my table's width or TD width. o.O. Commencing hair removal tactics.</p> <p>Page example: <a href="http://www.vdbestates.com/beta/residential.html" rel="nofollow">http://www.vdbestates.com/beta/residential.html</a> (view in Firefox and IE for best illustration)</p> <p>Html:</p> <pre><code>&lt;table id="IDX-showcaseWrapper-residentialListings" cellspacing="0" cellpadding="0" border="0" style="width: 100%;"&gt; &lt;tbody&gt; &lt;tr style="z-index: -1;"&gt; &lt;td class="IDX-showcaseDetails" valign="top" style="text-align: center; padding: 0px 0px 8px;"&gt;&lt;/td&gt; &lt;td class="IDX-showcaseDetails" valign="top" style="text-align: center; padding: 0px 0px 8px;"&gt;&lt;/td&gt; &lt;td class="IDX-showcaseDetails" valign="top" style="text-align: center; padding: 0px 0px 8px;"&gt;&lt;/td&gt; &lt;td class="IDX-showcaseDetails" valign="top" style="text-align: center; padding: 0px 0px 8px;"&gt;&lt;/td&gt; &lt;td class="IDX-showcaseDetails" valign="top" style="text-align: center; padding: 0px 0px 8px;"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr style="z-index: -1;"&gt;&lt;/tr&gt; ... &lt;tr style="height: auto; z-index: -1;"&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>I am using jQuery to dynamically assign new "top" values to the TDs in the other browsers, using a for loop, multiplying the index by the TD height:</p> <pre><code>var tCell; for(var i = 0; i &lt; size; i++) { tCell = $('td.IDX-showcaseDetails').eq(i); $(tCell).attr('style', 'top:' + (i * 250) + 'px;'); } </code></pre> <p>CSS: (all browsers)</p> <pre><code>table[id^=IDX-showcaseWrapper] { position:relative; min-height:1200px !important; padding-bottom:20px; z-index:1; display:block; } table[id^=IDX-showcaseWrapper] tr { position:relative; } .IDX-showcaseDetails { display:list-item !important; list-style-type:none; width:480px; height:275px; position:relative; clear:both; border-bottom:1px solid #5c4a57; margin-bottom:15px; padding:0px; z-index:1; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload