skip to Main Content

I am using twitter bootstrap in my .aspx page,
the btn-primary show text as blue instead of white.

<asp:LinkButton ID="btnConfirm" runat="server" Text="Confirm"
CausesValidation="true" ValidationGroup="req" CssClass="btn btn-primary" 
OnClick="btnConfirm_Click"></asp:LinkButton>

enter image description here

but the btn-default looks as expected.

What is the problem?
any help will be appreciated.

3

Answers


  1. You should try using Google Chrome inspect tool (or something like firebug extention on Firefox) and tracing the CSS rules that gives the text this blue color.
    Here’s some info on how to use inspect tool

    Login or Signup to reply.
    1. Make sure to use latest version of Twitter Bootstrap.
    2. Try change <asp:LinkButton…> to <asp:Button>, because <asp:LinkButton…> will render your control <a> tag, which ‘s css is defined by Bootstrap as

      a
      {
      color: #337ab7; /* This is the color of your Confirm button */

      }

    Login or Signup to reply.
  2. It looks like your CSS is overwriting the text colour value with blue text.

    Have a look at the page with the Developer tools and look at the CSS for the element. These things are usually easy to find and fix.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search