# Width(float)

> Option passed to a control to give it an absolute width.

## Definition

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

```csharp
public static GUILayoutOption Width(float width)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)):&#x20;

### Returns

| Type                                                                              | Description |
| --------------------------------------------------------------------------------- | ----------- |
| [GUILayoutOption](/engine/6000.7/script-reference/unityengine/guilayoutoption.md) |             |

### Remarks

![GUILayoutWidth (Width(float))](/api/media?file=/engine/6000.7/media/images/GUILayoutWidth.png)

Fixed width for a GUI Control.

### Examples

```csharp
using UnityEngine;

public class ExampleScript : MonoBehaviour
{
    // Draws a  button with a  fixed width
    void OnGUI()
    {
        GUILayout.Button("A Button with fixed width", GUILayout.Width(300));
    }
}
```
