Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot get ValidatorSummary to center

Status
Not open for further replies.

tshad

Programmer
Jul 15, 2004
386
US
I can get the text to center but not the bullets.

I tried surrounding with divs and tables but no matter what the bullets won't go to the center.

I have this at this point where I added the style to align the text to the left with the bullets and then tried to center the whole block but it stays on the left.

Code:
<div style="width: 100%">
   <table style="width: 100%">
      <tr>
         <td style="text-align: center">
            <asp:ValidationSummary ID="valSummary" runat="server" 
                   CssClass="ValidatorSummary" Style="text-align: left" />
         </td>
      </tr>
   </table>
</div>

I also have the class ValidtorSummary:

.ValidatorSummary
{
position: relative;
top: -15px;
font-size: 12px;
font-weight: bold;
background-color: inherit;
color: Red;
}

What am I missing?

Thanks,

Tom
 
Take the control out of the table and put it in a div and position the div
 
Originally, that was the way it was.

Code:
<div class="userMessage">
    <asp:Label ID="lblMessage" runat="server" Text="" ForeColor="green"></asp:Label>
    <asp:ValidationSummary ID="valSummary" runat="server" CssClass="ValidatorSummary" />
</div>

The style for the div:

.userMessage
{
text-align: center;
font-size: 12px;
font-weight: bold;
background-color: inherit;
color: Green;
}

Doing it this way centers the text (but the text doesn't line up as it does when left justified). But the bullets are all the way to the left.

I put it in a table to try to solve the issue.

The ValidationSummary object turns into a div that surrounds an unordered list.

Thanks,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top