CruftyCraft
CruftyCraft

Reputation: 781

Button width property ignored?

Both Firefox and Safari don't seem to properly render a button specified with a certain width:

<form>
<button>foo</button><br>
<button style="width=200px;height:200px">baz</button>
</form>

Button baz will render with specified height but default width. Same result in both Firefox and Safari.

Is this by design? How can I overcome this?

Upvotes: 6

Views: 42638

Answers (1)

David Thomas
David Thomas

Reputation: 253308

It's a syntax error:

<button style="width=200px;height:200px">baz</button>

Should be:

<button style="width:200px;height:200px">baz</button>

Upvotes: 11

Related Questions