Align ASP.Net AJAX Rating Extender control to Center of Table Cell using CSS

Last Reply 10 months ago By dharmendr

Posted 10 months ago

Hi ,

Below is the thread of my question

Add (Implement) 5 Star Rating System using AJAX Rating Extender in ASP.Net

solution works fine but the alignment of the rating control cannot be made center (under the rating label in my sample)

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
.emptypng {
    background-image: url(Star.gif);
    width: 17px;
    height: 17px;
}
.smileypng {
    background-image: url(FilledStar.gif);
    width: 17px;
    height: 17px;
}
.donesmileypng {
    background-image: url(FilledStar.gif);
    width: 17px;
    height: 17px;
}
.tbl{
    width:50%;
    height:50%;
    text-align:center;
    margin: 0 auto;
    border:1px solid red;
}
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:ScriptManager runat="server" ID="sc1"></asp:ScriptManager>
    <asp:Table ID="TableContent" runat="server" CssClass="tbl">
        <asp:TableRow>
            <asp:TableCell>
                <asp:Label runat="server" Text="rating"></asp:Label>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    </div>
    </form>
</body>
</html>

 

This question does not have replies that have been liked.