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>
but the btn-default
looks as expected.
What is the problem?
any help will be appreciated.
3
Answers
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
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 */
…
}
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.