Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7780663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:58:21+00:00 2026-06-01T18:58:21+00:00

I use jQuery Validate plugin to highlight errors. It replaces color of the text

  • 0

I use jQuery Validate plugin to highlight errors. It replaces color of the text with red, which is OK for all elements except one – .help-block, it should remain blue.

Here is the code without error:

<div class="control-group">
    <label class="control-label" for="place-of-birth">Place of birth</label>
    <div class="controls">
      <p class="help-block">Please input place of birth below, 2-80 symbols</p>
      <input type="text" class="input-xlarge" id="place-of-birth" name="place-of-birth" minlength="2" maxlength="80" autocomplete="off">
    </div>
</div>

And here is with the error message:

<div class="control-group error"> <!-- STYLE IS CHANGED HERE -->
    <label class="control-label" for="place-of-birth">Place of birth</label>
    <div class="controls">
      <p class="help-block">Please input place of birth below, 2-80 symbols</p>
      <input type="text" class="input-xlarge" id="place-of-birth" name="place-of-birth" minlength="2" maxlength="80" autocomplete="off">
      <div class="help-block" generated="true" for="place-of-birth">Please enter at least 2 characters.</div> <!-- THIS LINE IS ADDED -->
    </div>
</div>

I’ve tried to override that with the following CSS:

.control-group .error .help-block { color: blue; }

but it didn’t help. Demo.

What is wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:58:23+00:00Added an answer on June 1, 2026 at 6:58 pm

    Change it like this:

    .control-group.error .help-block { color: blue; }
    

    If you have two classes on one element there cannot be space between selectors. If there is a space it means that this class belongs to child tag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use jQuery with the Validate plugin, except I cannot get my
I want to validate text-boxes in JQuery bit I want to use regex for
I use jquery pagination plugin for paging... If there is one pagination plugin there
I am trying to use jquery validate plugin on my 5 questions quiz form.
Possible Duplicate: jquery validate & ajax.beginform I'm trying to use the jQuery validate plugin
When I use Jquery or its plugin, should I just add <script type=text/javascript src=http://code.jquery.com/jquery-latest.js></script>
I'm using jquery.validate plugin and facing the following situation: <form id=myForm ....> <input type=text
I use jquery validate plugin to verify what user input into the field. At
I'm using jQuery's validation plugin and looking to validate many dynamically added text fields
I use the jQuery Validate plugin to validate a form, and I want a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.