# margin

> The margins between elements rendered in this style and any other GUI elements.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.IMGUIModule

```csharp
public RectOffset margin { get; set; }
```

### Remarks

This only has effect when using automatic layout ().

Additional Resources: [GUILayout](/engine/6000.7/script-reference/unityengine/guilayout.md)

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    // Prints the left, right, top and down values of the GUIStyle margin

    RectOffset rctOff;

    void OnGUI()
    {
        rctOff = GUI.skin.button.margin;
        Debug.Log("Left: " + rctOff.left + " Right: " + rctOff.right);
        Debug.Log("Top: " + rctOff.top + " Bottom: " + rctOff.bottom);
    }
}
```
