I have a form with a bunch of form fields and as expected, users are able to successfully press the tab key to cycle through each form element in natural order. However, once they reach a particular DIV element (for which I manually had to add a tab-index attribute to make it focusable), although the element is able to get the focus correctly, the contents of the DIV slightly shift up (very similar to what it would have looked like if the following styles were to be applied to the DIV: position: relative and top: -3px). Then when I try to continue tabbing on to other elements and the focus is lost from the DIV, it continues to stay shifted up. I even tried reverse tabbing (SHIFT+TAB), which also doesn't reset the DIV back to its original position. How can I prevent this unwanted shift behavior with either CSS or JS?
P.S. I don't have the actual code snippet to provide here, but I can say that the markup in question is very simple and the DIV content is very straight-forward, without any crazy elements or styles applied to it or any of its children elements).