Alice
Alice

Reputation: 633

how to adjust character spacing of a label

How could I adjust the character spacing in a label control. There is no such a property in the property window.

<asp:Label ID="label01" runat="server" Text="EXPLORATIONS" Font-Bold="True"     
Font-Names="Verdana" Font-Size="Small" ForeColor="#999999"></asp:Label>

Upvotes: 1

Views: 2024

Answers (3)

Mahmoud Gamal
Mahmoud Gamal

Reputation: 79979

Using , you can adjust the letter spacing:

label#label01{
    letter-spacing: 1em;
}

Upvotes: 4

Grant Winney
Grant Winney

Reputation: 66501

You could use the CSS letter-spacing property:

<asp:Label ID="label01" runat="server" Text="EXPLORATIONS" Font-Bold="True" Font-Names="Verdana" Font-Size="Small" ForeColor="#999999" CssClass="YourStyle" />

<style>
.YourStyle
{
    letter-spacing: 4px;
}
</style>

Upvotes: 5

yogi
yogi

Reputation: 19619

You could apply a CssClass to your Label control in which you can give letter spacing.

Something like this

<style type="text/css">
        .spacing
        {
            letter-spacing:12px;
        }
</style>

<asp:Label ID="Label1" runat="server" Text="Your nice text line" 
      CssClass="spacing" />

Upvotes: 4

Related Questions