Max / Web Design Magic / Button Tutorial - Issue changing button width

Hi,

Firstly I imagine this is really basic and obvious - in which case I apologise for wasting anyone’s time.

I’m following the tutorials on Max / Web Design Magic and have created a new button component by creating a DIV (Title: Primary Button) with a child Headline element (Title: Headline). For the life of me I can’t find a way of shortening the ‘Button’ (div / headline) width so that it is as short as possible by default rather than filling the width of the container. The only workaround I’ve found is setting a max width for the Div that I will constantly be changing wherever the button is used, depending on text length. which is not ideal.

I’ve freeze framed the video tutorial and checked all settings but can’t see how I can get the component to just be as wide as the text and margin requires rather than filling all available space.

Thanks for your help!

David.

Hey David,

My recommendation is, don’t use the Div. Instead, use the Button element. This way, it’s much simpler because you only use one element.

The technical reason for this is that the Div element is a block element, so you don’t have any choice but to use the Max Width. The Button element, on the other hand, is an inline element.

If you really have to use the Div, you’ll need custom CSS. We can provide you with customization guidance in our One support.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.