Page 1 of 1

review text causing overflow

Posted: Wed Jan 11, 2012 11:09 am
by merance
I enabled product reviews and it causes a table overflow problem on the item page. See item http://www.adamshorsesupplies.com/Amigo ... -P716.aspx

I tried putting the product review conlib into a table but it didn't fix it. I think the problem is in the control itself, but I can't figure out where. It looks like it is telling it to be 450 px wide, but for some reason, it is not doing that? Any help will be appreciated!

<Columns>
<asp:TemplateField HeaderText="Rating" SortExpression="Rating">
<ItemStyle HorizontalAlign="Center" Width="60px" VerticalAlign="Top"/>
<ItemTemplate>
<asp:Image ID="ReviewRating" runat="server" ImageUrl='<%# NavigationHelper.GetRatingImage(AlwaysConvert.ToDecimal(Eval("Rating"))) %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Reviewer">
<ItemStyle Width="150px" VerticalAlign="Top"/>
<ItemTemplate>
<asp:Label ID="ReviewerName" runat="server" Text='<%#Eval("ReviewerProfile.DisplayName", "by {0}")%>'></asp:Label><br />
<asp:Label ID="ReviewerLocation" runat="server" Text='{0}<br />' Visible="false"></asp:Label>
<asp:Label ID="ReviewDate" runat="server" Text='<%# Eval("ReviewDate", "on {0:d}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Review">
<ItemStyle Width="450px" VerticalAlign="Top"/>
<ItemTemplate>
<asp:Label ID="ReviewTitleLabel" Text='<%#Eval("ReviewTitle")%>' runat="server" SkinID="FieldHeader"></asp:Label><br />
<asp:Literal ID="ReviewBodyLabel" Text='<%# "<pre class=Reviews>" + Eval("ReviewBody") + "</pre>"%>' runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>

Re: review text causing overflow

Posted: Thu Jan 12, 2012 9:15 am
by jmestep
Some stylesheets have the following at the bottom and some don't, so that might be causing your problem.

/* used to display reviews message */
pre.Reviews
{
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 12px;
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}