Add top margin to a Label control The Label class Represents a label control, which displays text on a Web page. The asp.net developers can use the Label control to display text in a set location on the web page. Unlike static text, asp.net c# developers can customize the displayed text through the Text property. The following asp.net c# tutorial code demonstrates how we can add the top margin to a Label web server control. To add the top margin to a Label control, the asp.net c# developers have to apply a custom CSS style to a Label control. In the below example code, we demonstrate two ways to add the top margin to a Label web server control. The Label CssClass property gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client. The CssClass property is inherited from WebControl. The CssClass property value is a String which is the CSS class rendered by the Label server control on the client. The defaul...
Android, .NET C#, Flutter, and Many More Programming tutorials.