Note that there are some explanatory texts on larger screens.

plurals
  1. POstyling issue in Chrome with datalist
    primarykey
    data
    text
    <p>I am having styling issue with products loaded in datalist control in Chrome. While everything looks ok in FF, Chrome gives me weird styling. Here are the screenshots:</p> <p>FF: <a href="http://gyazo.com/214fcfafbfb91e17ea1f084af84e61e4.png?1341955023" rel="nofollow">http://gyazo.com/214fcfafbfb91e17ea1f084af84e61e4.png?1341955023</a></p> <p>Chrome: <a href="http://gyazo.com/4459dc38dc01a18f62780392d8fb3625.png?1341955739" rel="nofollow">http://gyazo.com/4459dc38dc01a18f62780392d8fb3625.png?1341955739</a></p> <p>Here is the html markup: </p> <pre><code>&lt;div class="product-grid"&gt; &lt;asp:DataList ID="dlCatalog" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" RepeatLayout="Table" ItemStyle-CssClass="item-box"&gt; &lt;ItemTemplate&gt; &lt;nopCommerce:ProductBox1 ID="ctrlProductBox" Product='&lt;%# Container.DataItem %&gt;' runat="server" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:DataList&gt; &lt;/div&gt; </code></pre> <p>Here is the CSS:</p> <pre><code>.product-grid { margin-bottom: 15px; width: 586px; text-align: center; margin-left: -10px; } .product-grid .item-box { text-align: center; vertical-align: top; padding: 10px 11px 60px 11px; } .product-grid .product-item { text-align: center; margin: 10px 5px 10px 5px; width: 250px; background: url('images/prod_grid_box_bg.gif') no-repeat 0 100%; } .product-grid .product-item .product-title { font-weight: bold; font-size: 12px; background: url('images/deal_box_hl.gif') no-repeat 0 0; padding-left: 10px; } .product-grid .product-item .product-title a { background: url('images/deal_box_hr.gif') no-repeat 100% 0; display: block; height: 2em; line-height: 1.3em; overflow: hidden hidden; padding: 4px 10px 8px 0px; } .product-grid .product-item .picture { text-align: center; margin-top: 10px; } .product-grid .product-item .description { margin: 5px 5px 0 5px; text-align: center; padding: 10px 5px 10px 5px; border-top: solid 1px #e3e3e3; color: #555; height: 50px; } .product-grid .product-item .add-info { vertical-align: bottom; text-align: right; width: 250px; height: 85px; position: relative; } .product-grid .product-item .add-info .prices { text-align: right; vertical-align: middle; position: absolute; bottom: 15px; right: 10px; } .product-grid .product-item .add-info .buttons { vertical-align: middle; position: absolute; bottom: 15px; left: 10px; text-align: left; } .product-grid .product-item .add-info .prices .productPrice { color: green; } .product-grid .product-item .add-info .prices .oldproductPrice { color: Red; text-decoration: line-through; } </code></pre> <p>PRODUCT BOX CODE ADDED: </p> <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.ProductBox1Control" CodeBehind="ProductBox1.ascx.cs" %&gt; &lt;%@ Register TagPrefix="nopCommerce" TagName="ProductPrice2" Src="~/Modules/ProductPrice2.ascx" %&gt; &lt;script type="text/javascript" language="javascript" src="../Scripts/jquery.expander.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; // you can override default options globally, so they apply to every .expander() call //$.expander.defaults.slicePoint = 50; $(document).ready(function () { // simple example, using all default options unless overridden globally //$('div.expandable h3').expander(); // *** OR *** // override default options (also overrides global overrides) $('div.expandable h3').expander({ slicePoint: 50, // default is 100 expandPrefix: '.....', // default is '... ' expandText: '&gt;&gt;', // default is 'read more' collapseTimer: 5000, // re-collapses after 5 seconds; default is 0, so no re-collapsing userCollapseText: '&lt;&lt;' // default is 'read less' }); }); &lt;/script&gt; &lt;%--&lt;div class="product-item"&gt; &lt;h2 class="product-title"&gt; &lt;asp:HyperLink ID="hlProduct" runat="server" /&gt; &lt;/h2&gt; &lt;div class="picture"&gt; &lt;asp:HyperLink ID="hlImageLink" runat="server" /&gt; &lt;/div&gt; &lt;div class="description"&gt; &lt;asp:Literal runat="server" ID="lShortDescription"&gt;&lt;/asp:Literal&gt; &lt;/div&gt; &lt;div class="add-info"&gt; &lt;div class="prices"&gt; &lt;nopCommerce:ProductPrice2 ID="ctrlProductPrice" runat="server" ProductId='&lt;%#Eval("ProductId") %&gt;' /&gt; &lt;/div&gt; &lt;div class="buttons"&gt; &lt;asp:Button runat="server" ID="btnProductDetails" OnCommand="btnProductDetails_Click" Text="&lt;% $NopResources:Products.ProductDetails %&gt;" ValidationGroup="ProductDetails" CommandArgument='&lt;%# Eval("ProductId") %&gt;' CssClass="productgridproductdetailbutton" /&gt;&lt;br /&gt; &lt;asp:Button runat="server" ID="btnAddToCart" OnCommand="btnAddToCart_Click" Text="&lt;% $NopResources:Products.AddToCart %&gt;" ValidationGroup="ProductDetails" CommandArgument='&lt;%# Eval("ProductId") %&gt;' CssClass="productgridaddtocartbutton" /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;--%&gt; &lt;div class="pblock"&gt; &lt;div class="borderProd"&gt; &lt;div class="expandable"&gt; &lt;h3&gt; &lt;asp:HyperLink ID="hlProduct" runat="server" /&gt; &lt;/h3&gt; &lt;/div&gt; &lt;asp:Literal runat="server" ID="lShortDescription" Visible="false"&gt;&lt;/asp:Literal&gt; &lt;/div&gt; &lt;div class="img"&gt; &lt;a id="hlImageLink" runat="server"&gt; &lt;img id="hlImage" runat="server" style="max-width:170px;max-height:120px"/&gt; &lt;/a&gt; &lt;div class="body"&gt; &lt;/div&gt; &lt;div class="body"&gt; &lt;nopCommerce:ProductPrice2 ID="ctrlProductPrice" runat="server" ProductId='&lt;%#Eval("ProductId") %&gt;' /&gt; &lt;/div&gt; &lt;asp:Label ID="labUniversal" runat="server" ForeColor="Blue" Text=""&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
    singulars
    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.
 

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