Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Positioning of Rating Control

$
0
0
I am using an AJAX:Rating and for some reason, I can't center it inside a <TD> even though other text will center, it always positions like it is left justified. 

I tried to Google this and only came across one issue that you need to be a member to see (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_24730341.html):

Would anyone know the issue:

<ContentTemplate>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td>
                        <asp:DataList
                            ID="dataList"
                            OnItemDataBound="dataList_OnItemDataBound"
                            RepeatColumns="4"
                            RepeatDirection="Horizontal" SeparatorStyle-BackColor="Black" SeparatorStyle-Width="5"
                            EnableViewState="false" CellSpacing="10"
                            Runat="server">
                            <ItemTemplate>
                                <table cellspacing="15" width="100%">
                                    <tr>
                                        <td valign="top">
                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
                                                    <td valign="top" class="photoTitle">
                                                        <%# DataBinder.Eval(Container.DataItem, "PhotoTitle") %>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="photo">
                                                        <a
                                                            id="imgFullSize"
                                                            data-rel="prettyPhoto"
                                                            runat="server">
                                                            <asp:Image
                                                                ID="imgThumbnail"
                                                                height="100"
                                                                Width="133"
                                                                runat='server'>
                                                            </asp:Image>
                                                        </a>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="photoInfo" align="center">
                                                        <%# DataBinder.Eval(Container.DataItem, "PhotoLocation") %>
                                                        <br />
                                                        <ajaxToolkit:rating
                                                            ID="ratingSystem" HorizontalAlign="Center"
                                                            runat="server"
                                                            CurrentRating='<%# Convert.ToInt32(Eval("Rating")) %>'
                                                            MaxRating="5"
                                                            StarCssClass="ratingStar"
                                                            WaitingStarCssClass="savedRatingStar"
                                                            FilledStarCssClass="filledRatingStar"
                                                            EmptyStarCssClass="emptyRatingStar"
                                                            Tag='<%# DataBinder.Eval(Container.DataItem, "ParanormalPhotographyPhotoID") %>'
                                                            OnChanged="photoRating_Changed" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:DataList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Panel ID="BottomPager_Panel" CssClass="pager" runat="server"></asp:Panel>
                    </td>
                </tr>
            </table>
        </ContentTemplate>

.photoTitle
{
    background-color: #403830;
    color: #F9F4E1;
    font-weight: bold;
    padding-top: 1px;
    padding-left: 3px;
    padding-bottom: 0px;
    padding-right: 3px;
}
.photo
{
    background-color: #716457;   
}
.photoInfo
{
    background-color: #716457;
    color: #F9F4E1;
    padding-top: 1px;
    padding-left: 3px;
    padding-bottom: 0px;
    padding-right: 3px;
}

/* =================  Rating ================= */

.ratingStar
{
    font-size: 0pt;
    width: 13px;
    height: 12px;
    margin: 0px;
    padding: 0px;
    cursor: pointer;
    text-align: center;
}

.filledRatingStar
{
    background-image: url('/Images/FilledStar.png');
}

.emptyRatingStar
{
    background-image: url('/Images/EmptyStar.png');
}

.savedRatingStar
{
    background-image: url('/Images/SavedStar.png');
}


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>