Articles in this section
Category / Section

How to set padding in the WinForms HTMLIUI Control?

3 mins read

Padding

In the WinForms HTMLUI control, padding can be used to specify the space between the element’s border and its content. The left, right, top, and bottom padding attributes can also be specified independently. The uses of the padding attributes are as follows:

 

Padding: The padding attribute is used to specify a fixed space for all the four sides of the element’s contents.

Padding Left: The padding-left attribute is used to specify the padding for the left side of the element.

Padding Right: The padding-right attribute is used to specify the padding property at the right side of the HTML element.

Padding Top: The padding-top attribute specifies the padding at the top edge of the element.

Padding Bottom: The padding-bottom attribute specifies the padding at the bottom of the HTML element from its border.

 

The following code example demonstrates the same.

HTML

<html>
<head><style type="text/css">
table, th, td { border: 2px solid Red; }
th, td { padding: 20px; }
</style></head>
<body>
<table style="width:40%" >
  <tr>
    <th>First Name</th>
    <th>Last Name</th>  
    <th>Points</th>
  </tr>
  <tr>
    <td>Jill</td>
    <td>Smith</td>  
    <td>50</td>
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>  
    <td>94</td>
  </tr>
</table>
</ul><hr><p class='title'>Objectives</p><p style="padding-left:10px">This is Syncfusion HTMLUI Control, that shows the padding effect</p><ul>
</body>
</html>

 

The following image shows the padding attribute used in the HTMLUI control

Set the padding in HTMLUIControl

 

Note:

The margin of the HTMLUI Control can be specified by using the padding attribute. Hence, the user can use the padding attribute instead of margin attribute.

 

Samples:

C#: https://www.syncfusion.com/downloads/support/directtrac/137701/HTMLUI496458222.zip

VB: https://www.syncfusion.com/downloads/support/directtrac/137701/HTMLUI_VB684676202.zip

 

Conclusion

I hope you enjoyed learning about how to set padding in the WinForms HTMLIUI Control.

You can refer to our WinForms HTMLUI control’s feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms HTMUI control documentation to understand how to present and manipulate data. 

For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms HTMUI control and other WinForms components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied