Page 1 of 1
Left justifty Summary on categorygridpage
Posted: Fri Nov 05, 2010 1:01 am
by Jaz
I want to left justify the summary text for each item in the catregory grid page, but left the rest of the content (thumbnail, reviews, price) centered. How would I did this?
Also, I would like to add some spacing between the summary and the price.
Thanks,
Re: Left justifty Summary on categorygridpage
Posted: Fri Nov 05, 2010 5:57 am
by mazhar
I think you will be required to some CSS styles. For example you can setting text-alig:left on following style
Code: Select all
.catalog .tableNode div span { text-align:left;}
Re: Left justifty Summary on categorygridpage
Posted: Fri Nov 05, 2010 1:15 pm
by Jaz
Thanks. However I am having trouble figuring out where the summary is called out. Where in the code would I put the div tag?
Code: Select all
<div class="catalogWrapper">
<asp:DataList ID="CatalogNodeList" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" Width="100%"
OnItemDataBound="CatalogNodeList_ItemDataBound" DataKeyField="CatalogNodeId" CssClass="catalog" EnableViewState="false" HorizontalAlign="Left">
<ItemStyle HorizontalAlign="center" VerticalAlign="bottom" Width="33%" CssClass="tableNode" />
<ItemTemplate>
<asp:PlaceHolder ID="phItemTemplate1" runat="server"></asp:PlaceHolder>
<uc:ProductPrice ID="Price" runat="server" Product='<%#Container.DataItem%>' />
<asp:PlaceHolder ID="phItemTemplate2" runat="server"></asp:PlaceHolder>
<div style="margin-top:10px;margin-bottom:20px" id="Add2CartLinkDiv" runat="server" visible="false" /></div>
</ItemTemplate>
<SeparatorTemplate> </SeparatorTemplate>
<SeparatorStyle CssClass="separator" Width="1" />
</asp:DataList>
<br /><br /><br />
<div style="margin-top:30px;margin-bottom:20px" >
Re: Left justifty Summary on categorygridpage
Posted: Fri Nov 05, 2010 4:23 pm
by jmestep
That would depend on what placeholder you are adding your summary to from the code behind and you can format it there. If it isn't there, then you could add a new label or placeholder formatted the way you want.
Re: Left justifty Summary on categorygridpage
Posted: Fri Nov 05, 2010 6:17 pm
by Jaz
I'll admit that I am not too good with the acsx.cs files. Here is what I am trying:
Code: Select all
//OUTPUT SUMMARYcellField .Attributes.Add("style", "TEXT-ALIGN: left");
itemTemplate1.Controls.Add(new style ("TEXT-ALIGN: left"));
itemTemplate1.Controls.Add(new LiteralControl(catalogNode.Summary));
}
itemTemplate1.Controls.Add(new LiteralControl("<br />"));
Definately not working.