Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8772247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:59:28+00:00 2026-06-13T17:59:28+00:00

Some strange bug I came accross today when creating a generic button class to

  • 0

Some strange bug I came accross today when creating a generic button class to style everything from divs to inputs. It seems that most browsers use a different box model when it comes down to input[type=submit].

Most modern browsers (ie9+, ff, chrome, etc) use the content-box box model for all inputs except submit which uses border-box if im not mistaken.

Basically, if I set a height of 100 and padding of 10 all around, the height of all inputs except submit would be 120 where as the height of submit would be 100.

This is easily fixed using box-sizing and its browser prefixes. But my problem is with IE6/7 which do the same thing but do not support box-sizing…

so now all my inputs display full height except for submit which is cut in half. What options do i have to force content-box or another fix apart from conditional comments?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:59:29+00:00Added an answer on June 13, 2026 at 5:59 pm

    IE’s old “broken” box model is essentially content-box. In IE>5 the document needs to be in quirks mode for IE to use it. You can trigger quirks mode by doing one of the following (according to wikipedia):

    • When the document type declaration is absent or incomplete;
    • When an HTML 3 or earlier document is encountered
    • When an HTML 4.0 Transitional or Frameset document type declaration is used and a
      system identifier (URI) is not present
    • When an SGML comment or other
      unrecognized content appears before the document type declaration
    • When there are errors anywhere in the document

    Now of course, this probably makes more trouble than it’s worth because it would make everything use the IE box model (content-box). I could see this being useful, but if your layout wasn’t built this way, it’s probably too much work to go back and change it.

    I did some searching around and didn’t find anything that would enable the old box model on certain elements, and not others.

    Having dealt with IE6/7 in the past, there’s really no way to get around it’s buggy behavior without using something like conditional comments or css hacks. It’s rendering engine is just fundamentally broken compared to other browsers. Trying to get it to behave without any hacks is just asking for headaches.

    The only other thing I can think of is to surround each form element with a span or div, and use them to help size your form elements. This also sucks, but it has the advantage of at least working in every browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I came across a strange behaviour when doing some regular expressions in JavaScript today
I've got some strange bug: when I open page first time in some browser
I have come across some strange behaviour, and I'm assuming a bug in Firefox,
I have a very strange bug, which I believe is caused by some code
I have some strange behavior redirecting stdout and stderr from s3cmd. For example: $
Recently I came across some strange behaviour of my application. It has been developed
I seem to have run into a strange bug or more likely some setting
A strange bug I can't track down. I've implemented a ContactListener class for handling
I've today discovered some strange behaviour in IE8's implementation of the DOM select element's
I recently came across a very very strange, and very bad bug in jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.