Search code examples
asp.netcssdotnetnukeascx

Center non text within a table


I am trying to figure out a way to center a "rating" within a table, I can figure out how to align text and images but i can not figure out how to align this rating, since its technically not text or an image.

the code looks like below

<td align="center" style="text-align: center; vertical-align: middle; background-color: #444444;" 
    valign="top">
    <cc2:DnnRating ID="ProductReviewAverageOverallRatingDnnRating" 
                    runat="server" ReadOnly="true"
                    Value='<%# Eval("ProductReviewAverageOverallRatingDnnRating_Value") %>' 
                    Visible='<%# Convert.ToBoolean(Eval("ProductReviewAverageOverallRatingDnnRating_Visible")) %>'>
    </cc2:DnnRating>

     ... I would assume that it would go somewhere within the first line. As you can see the text-align is there and vertical-align etc... but it does not work.

<td align="center" 
    style="text-align: center; vertical-align: middle; background-color: #444444;" 
    valign="top">

I need direction on what to do or how this can be accomplished,

Thank You in advance this part if from an inspect

td valign="top" align="center" style="text-align: center; vertical-align: middle; background-color: #444444;"><div id="dnn_ctr416_ViewRevindexStorefrontProductShowcase_ctl00_ProductShowcaseDnnRotator_i2_ProductReviewAverageOverallRatingDnnRating" class="RadRating RadRating_Default" style="width: 104px; height: 24px;"><ul class="rrtItem"><li class="rrtSelected"></li><li class="rrtSelected"></li><li class="rrtSelected"></li><li class="rrtSelected"><a href="#" title="5"><span></span>

Solution

  • Have you tried style="margin:0px auto;"? I can't tell what the rendered HTML would be from the control. Thanks!