CSS borders in Firefox and IE

FF will display borders OUTSIDE of a div element, adding the border width to the element widget. IE will squeeze borders INSIDE and the total width stays the same.

Workaround for this which makes FF behave like IE:

* {
-moz-box-sizing: border-box;

(* applies it to all elements, if you don’t need that, add it only to a desired element)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s