Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET - Repeater flowing outside div
    primarykey
    data
    text
    <p>I have a <strong>table</strong> inside a <strong>repeater</strong> inside a <strong>div</strong> in <strong>asp</strong>.</p> <p>When filling the repeater, some of the table rows inside it are too large horizontally, so the whole repeater width is flowing outside the DIV. </p> <p>I tried everything, but nothing works. this is my code:</p> <pre><code> &lt;div&gt; &lt;asp:Repeater ID="RepeaterColors" runat="server"&gt; &lt;HeaderTemplate&gt; &lt;table border="1" width="100%;" &gt; &lt;tr&gt; &lt;th style="min-width: 62px; width: 62px;"&gt;Color Word ID&lt;/th&gt; &lt;th style="min-width: 62px; width: 62px;"&gt;Color English Meaning&lt;/th&gt; &lt;th style="min-width: 62px; width: 62px;"&gt;&lt;/th&gt; &lt;th style="min-width: 62px; width: 62px;"&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/HeaderTemplate&gt; &lt;ItemTemplate&gt; &lt;tr&gt; &lt;td&gt; &lt;%# Eval("MsgColor_wordID")%&gt;&lt;/td&gt; &lt;td&gt; &lt;%# Eval("MsgColor_Eng")%&gt;&lt;/td&gt; &lt;td &gt; &lt;asp:LinkButton ID="BtnEdit" runat="server" ForeColor="#CC0000" CommandName="edit" CommandArgument = '&lt;%#Eval("MsgColor_ID")%&gt;' &gt;Edit&lt;/asp:LinkButton&gt;&lt;/td&gt; &lt;td &gt; &lt;asp:LinkButton ID="BtnDelete" runat="server" ForeColor="#CC0000" CommandName="delete" OnClientClick="return confirm('This record will be deleted. Proceed?')" CommandArgument = '&lt;%#Eval("MsgColor_ID")%&gt;' &gt;Delete&lt;/asp:LinkButton&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/ItemTemplate&gt; &lt;FooterTemplate&gt; &lt;/table&gt; &lt;/FooterTemplate&gt; &lt;/asp:Repeater&gt; &lt;/div&gt; </code></pre> <p>This div and the whole code is inside one <strong>div</strong> :</p> <pre><code>&lt;div id="container"&gt; </code></pre> <p>css:</p> <pre><code> #container { text-align:left; background:#fff; border:1px solid #ccc; margin:0 auto 10px auto; width:641px } </code></pre> <p>Here's how this is being displayed when large data is in the first cell: <em>(DIV is the white space.)</em> </p> <p><img src="https://i.stack.imgur.com/2doSe.png" alt="enter image description here"></p>
    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