Michael
Michael

Reputation: 13616

How can I change text size and bold in asp:LinkButton?

I have this asp control:

<asp:LinkButton Text="X" runat="server" />

How can I change text size and bold to display the X text similar to this image:

enter image description here

Upvotes: 0

Views: 2340

Answers (2)

Francis Nepomuceno
Francis Nepomuceno

Reputation: 5085

Looks like that's from Font Awesome. If so, use the following instead:

<asp:LinkButton runat="server">
  <i class="fa fa-times fa-5x"></i>
</asp>

Upvotes: 1

n8wrl
n8wrl

Reputation: 19765

An asp:linkbutton renders as an < a > tag so write some CSS that targets that and styles it as you need to.

For example, if you gave it a class:

<asp:linkbutton cssclass="mybutton" runat="server" text="X"/>

You could style it

a.mybutton {
    font-size: 50px;
}

Upvotes: 1

Related Questions