Solved

Repeater overflowing out of div in Firefox.

Posted on 2010-09-09
5
584 Views
Last Modified: 2012-05-10
I have a repeater that is overflowing outside of a div rather than extending it in Firefox but it looks fine in IE, Chrome and Safari.
<asp:Panel ID="pnlNotes" Visible="true" runat="server">
	    <br />
        <h2>Notes</h2>
        <br />
        <asp:Button ID="btnNote" Text="Add Note" OnClick="btnNote_Click" runat="server" />
        <asp:Repeater id="rptNotes" runat="server">
            <HeaderTemplate>
                <table class="indentedTable" cellSpacing="3" cellPadding="0" width="600px" align="left" border="1">
            </HeaderTemplate>

            <ItemTemplate>
                <tr>
                    <td align="left" width="10%">
                        <label class="coloredText">Name:</label>
                    </td>
                    <td width="45%">
                        <%# DataBinder.Eval(Container.DataItem, "Name") %>
                    </td>
                    <td align="left" width="10%">
                        <label class="coloredText">Time:</label>
                    </td>
                    <td width="35%">   
                        <%# DataBinder.Eval(Container.DataItem, "ActionTime") %>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <%# DataBinder.Eval(Container.DataItem, "Note") %>
                    </td>
                </tr>
            </ItemTemplate>
    
            <SeparatorTemplate>
                <tr>
                    <td colspan="4"><hr color="black" /><br /></td>
                </tr>
            </SeparatorTemplate>

            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
	    <br />
	</asp:Panel>

Open in new window

repeater.jpg
0
Comment
Question by:FIM2003
  • 3
  • 2
5 Comments
 
LVL 30

Expert Comment

by:MlandaT
ID: 33648235
You need to post the CSS code which you are using otherwise it is not possible to help you figure this one out. Particularly "indentedTable".



0
 
LVL 30

Expert Comment

by:MlandaT
ID: 33648251
Maybe post the HTML being output by the page as well then we just look at where the problem is coming from. This type of problem is normally just related to your CSS.
0
 

Author Comment

by:FIM2003
ID: 33648812
indentedTable is actually an old class that is no longer used in the current CSS file (I just missed it to take it out) so it wasn't specifying anything. Here is the outputted HTML code. coloredText is just font-weight: bold.
<div id="ctl00_contentplaceholder2_pnlNotes">
	
	    <br />

        <h2>Notes</h2>
        <br />
        
        
                <table class="" cellSpacing="3" cellPadding="0" width="600px" align="left" border="1">
            
                <tr>
                    <td align="left" width="10%">
                        <label class="coloredText">Name:</label>
                    </td>
                    <td width="45%">

                        ---
                    </td>
                    <td align="left" width="10%">
                        <label class="coloredText">Time:</label>
                    </td>
                    <td width="35%">   
                        10/12/2009 4:00:18 PM
                    </td>
                </tr>
                <tr>

                    <td colspan="4">
                        Assigned to --- in Purchasing
                    </td>
                </tr>
            
                <tr>
                    <td colspan="4"><hr color="black" /><br /></td>
                </tr>
            
                <tr>
                    <td align="left" width="10%">

                        <label class="coloredText">Name:</label>
                    </td>
                    <td width="45%">
                        ---
                    </td>
                    <td align="left" width="10%">
                        <label class="coloredText">Time:</label>
                    </td>

                    <td width="35%">   
                        10/12/2009 3:58:15 PM
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        Assigned to --- in Purchasing
                    </td>
                </tr>
            
                </table>

            
	    <br />
	
</div>

Open in new window

0
 
LVL 30

Accepted Solution

by:
MlandaT earned 500 total points
ID: 33648989
Try this:

1. Give the asp:Panel a width of 100%.
2. Add a style="overflow:auto" to the asp:Panel as well.

Works fine if the DIV is rendered as:

<div id="ctl00_contentplaceholder2_pnlNotes" style="overflow: auto; width:100%">
0
 

Author Closing Comment

by:FIM2003
ID: 33649342
This did the trick. Thank you!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to ensure the user enters a value in a date field in an ASP.NET application? 1 17
Connection to multiple databases 13 19
Select case on click 3 16
Linq asp.net mvc 13 10
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question