title: Plotly custom buttons overflow
body: <p>I am following this Plotly tutorial: <a href="https://plotly.com/python/custom-buttons/#restyle-button" rel="nofollow noreferrer">https://plotly.com/python/custom-buttons/#restyle-button</a>
  Specifically, consider the code:</p>
  <pre><code>import plotly.graph_objects as go
  
  import pandas as pd
  
  # load dataset
  df = pd.read_csv(&quot;https://raw.githubusercontent.com/plotly/datasets/master/volcano.csv&quot;)
  
  # create figure
  fig = go.Figure()
  
  # Add surface trace
  fig.add_trace(go.Surface(z=df.values.tolist(), colorscale=&quot;Viridis&quot;))
  
  # Update plot sizing
  fig.update_layout(
      width=800,
      height=900,
      autosize=False,
      margin=dict(t=0, b=0, l=0, r=0),
      template=&quot;plotly_white&quot;,
  )
  
  # Update 3D scene options
  fig.update_scenes(
      aspectratio=dict(x=1, y=1, z=0.7),
      aspectmode=&quot;manual&quot;
  )
  
  # Add dropdown
  fig.update_layout(
      updatemenus=[
          dict(
              type = &quot;buttons&quot;,
              direction = &quot;left&quot;,
              buttons=list([
                  dict(
                      args=[&quot;type&quot;, &quot;surface&quot;],
                      label=&quot;3D Surface&quot;,
                      method=&quot;restyle&quot;
                  ),
                  dict(
                      args=[&quot;type&quot;, &quot;heatmap&quot;],
                      label=&quot;Heatmap&quot;,
                      method=&quot;restyle&quot;
                  )
              ]),
              pad={&quot;r&quot;: 10, &quot;t&quot;: 10},
              showactive=True,
              x=0.11,
              xanchor=&quot;left&quot;,
              y=1.1,
              yanchor=&quot;top&quot;
          ),
      ]
  )
  
  # Add annotation
  fig.update_layout(
      annotations=[
          dict(text=&quot;Trace type:&quot;, showarrow=False,
                               x=0, y=1.08, yref=&quot;paper&quot;, align=&quot;left&quot;)
      ]
  )
  
  fig.show()
  </code></pre>
  <p>Now add 15 more buttons, just add</p>
  <pre><code>        dict(
              args=[&quot;type&quot;, &quot;surface&quot;],
              label=&quot;3D Surface&quot;,
              method=&quot;restyle&quot;
          )
  </code></pre>
  <p>in the <code>buttons</code> of the <code>updatemenus</code> (basically add the same button 15 more times). If you run it now, you will see that the buttons start overflowing on the right. How can I solve this? For me, it would be a good solution to show to rows of buttons, but showing one without overflowing would also work.</p>