jilseego
jilseego

Reputation: 1103

Firefox ignores percentage width value set for text input element

In the screenshots, the form text fields are set to 97% to create a gap between them. It works in all browsers except Firefox -- it seems it stretches all the way to 100%. Anyone pls give me a way to get around this?

enter image description here

Upvotes: 1

Views: 406

Answers (2)

fizzy drink
fizzy drink

Reputation: 682

I am using FF 13.0.1 on Mac OS and the gap shows correctly.

enter image description here

Upvotes: 0

Niet the Dark Absol
Niet the Dark Absol

Reputation: 324650

Try adding box-sizing: border-box (and the corresponding -moz-box-sizing, -webkit-box-sizing). Otherwise, padding and margin are added to the 97% instead of included in.

Upvotes: 6

Related Questions