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 9273161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:02:51+00:00 2026-06-18T16:02:51+00:00

I’ve uploaded this question a while ago but it ended up giving me the

  • 0

I’ve uploaded this question a while ago but it ended up giving me the tumbleweed badge so I’m trying again.

I’m going through Michael Hartl’s railstutorial right now and I’ve encountered a problem where box-sizing property is interfering with form heights as shown in pictures below.

@mixin box_sizing {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

input, textarea, select, .uneditable-input {
  border: 1px solid #bbb;
  width: 100%;
  height: auto;
  margin-bottom: 15px;
  @include box_sizing; <--- this line here is causing issues
}

box-sizing in effect

(box-sizing property in effect)

box-sizing not in effect

(box-sizing property not in effect)

Notice how much smaller forms are when box-sizing property is in effect? You can’t really view full letters because the height is so low. I’ve tried to change the height property under input, textarea, ..etc. but it seems like my code is being overridden by Bootstrap. If you have any idea how to make the forms bigger (greater height) I would really appreciate it.

  • 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-18T16:02:53+00:00Added an answer on June 18, 2026 at 4:02 pm

    box-sizing: border-box changes the box model so padding is taken out from the height, rather than adding to it.

    So this block:

    div {
      box-sizing: content-box; // default
      height: 2em;
      padding: .25em;
    }
    

    Will be 2.5em tall, and this block:

    div {
      box-sizing: border-box;
      height: 2em;
      padding: .25em;
    }
    

    will be 2em tall, with .5em of spacing partitioned for the padding.

    The other issue is how bootstrap defines the height of inputs:

    input[type="text"], ...other selectors..,
    .uneditable-input {
      display: inline-block;
      height: 20px;
      ...
    }
    

    The reason defining a height wasn’t working, is because input[type="text"] is more specific than input, and therefore the bootstrap declaration was overriding yours.

    To solve the problem you are having with the inputs, define a height and use a more specific selector:

    input[type="text"], textarea, select, .uneditable-input {
      border: 1px solid #bbb;
      width: 100%;
      height: 2em;
      margin-bottom: 15px;
      @include box_sizing;
    }
    

    Demo

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

Sidebar

Related Questions

This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to loop through a bunch of documents I have to put
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,

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.