Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Cannot get ValidatorSummary to center

Cannot get ValidatorSummary to center

Cannot get ValidatorSummary to center

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%">
         <td style="text-align: center">
            <asp:ValidationSummary ID="valSummary" runat="server" 
                   CssClass="ValidatorSummary" Style="text-align: left" />

I also have the class ValidtorSummary:

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

What am I missing?



RE: Cannot get ValidatorSummary to center

Take the control out of the table and put it in a div and position the div

RE: Cannot get ValidatorSummary to center

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" />

The style for the div:

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.



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close