0

I am building a web-based, self-quizzing application, but I'm having some troubles out of my input form. I have it structured such that each input element has its own cell in a table. I'm including a picture for reference. The table alternates columns of numbers and input elements. I did this mainly for ease of aesthetic structure.

Unfortunately, those aesthetics are messed up whenever a user enters a string into the input element. The elements move closer to the bottom of the page once a user has entered a string and then tabbed to the next input element. I'm including another picture for reference.

Does anyone have any idea what could be causing this error? I'm happy to update with any details necessary concerning the markup, css, or jQuery.

4
  • 3
    Link to the site or a jsfiddle with the error might help. But here is a wild guess, the input has some css property for :focus which is causing the top margin? Commented Sep 8, 2013 at 19:20
  • @SwashataGhosh , it does have a :focus added to it, but the only things that get altered are the background-color, outline, and box-shadow. I'm developing on my localhost, so I'm not sure if I could fit everything on jsfiddle. Commented Sep 8, 2013 at 19:26
  • What browser do you use? Commented Sep 8, 2013 at 19:56
  • @AndriyF. I've been developing in Chrome on Mac OSX. Commented Sep 8, 2013 at 19:58

1 Answer 1

1

The culprit seems to be

vertical-align: baseline;

in CSS

Sign up to request clarification or add additional context in comments.

3 Comments

Wow. That worked swimmingly. I always looked at CSS normalize as returning everything to an empty default state. Never thought I would CREATE a css problem from CSS normalize. What does that line actually do?
baseline Aligns the baseline of the element with the baseline of its parent. The baseline of some replaced elements, like <textarea> is not specified by the HTML specification, meaning that their behavior with this keyword may change from one browser to the other. (MDN)
PS: quite nice normalize.css is used in HTML Boilerplate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.