How does tabbing affect position and display

Discussion in 'HTML' started by bryan rasmussen, Mar 25, 2014.

  1. Hi,

    I have an application the code of which I am unfortunately not allowed to put out on the net, but hopefully you can help me anyway because I think this is just a part of the html/css stack where I am not as knowledgeable as I would like.

    The application is in an iframe.

    In the application we have a #logo div, positioned absolutely at the top of the page, followed by a div #boxtop with an iframe in it with a margin-top they same as the height of the logo div, followed by a div #content with some form fields.

    overflow on the document as a whole is set to hidden, however both #boxtop and #content have overflow auto, in smaller sizes of iframe they overflow.

    When I tab through the form elements it seems that the #content div expands in size, pushing the #boxtop div up, so that part of it is hidden under the #logo.

    Why does this happen? From various experiments it seems intrinsic to tabbing. The problem is if I set a tabindex on my #boxtop I can get focus on the element but it is not moved down so that the top is visible again. Is there a way to force this?
    bryan rasmussen, Mar 25, 2014
    #1
    1. Advertising

  2. 2014-03-25 11:40, bryan rasmussen wrote:

    > I have an application the code of which I am unfortunately not
    > allowed to put out on the net,


    You should construct a demo, with all confidential data stripped off of
    course, upload it on a server, and post a URL. Without something
    tangible, this is just shooting in the dark.

    > The application is in an iframe.


    Is that relevant? Does the problem manifest itself when the code is
    tested as a standalone document? Try to isolate the issue to a minimal case.

    > When I tab through the form elements it seems that the #content div
    > expands in size,


    Well, does it expand? What do the browser’s developer tools say about
    its dimensions?

    > Why does this happen?


    Well, the obvious guess is that you have a style sheet that uses the
    :focus pseudo-class, or an onfocus event handler that changes something
    on the page. Can’t really guess more accurately... or should I say “Oh,
    I think it’s on line 8961”?

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Mar 25, 2014
    #2
    1. Advertising

  3. bryan rasmussen

    se Guest

    "bryan rasmussen" <> skrev i meddelelsen
    news:...
    >
    > Hi,
    >
    > I have an application the code of which I am unfortunately not allowed to
    > put out on the net, but hopefully you can help me anyway because I think
    > this is just a part of the html/css stack where I am not as knowledgeable
    > as I would like.


    Bull-shit!.

    >
    > The application is in an iframe.
    >
    > In the application we have a #logo div, positioned absolutely at the top
    > of the page, followed by a div #boxtop with an iframe in it with a
    > margin-top they same as the height of the logo div, followed by a div
    > #content with some form fields.
    >
    > overflow on the document as a whole is set to hidden, however both #boxtop
    > and #content have overflow auto, in smaller sizes of iframe they overflow.
    >
    > When I tab through the form elements it seems that the #content div
    > expands in size, pushing the #boxtop div up, so that part of it is hidden
    > under the #logo.
    >
    > Why does this happen? From various experiments it seems intrinsic to
    > tabbing. The problem is if I set a tabindex on my #boxtop I can get focus
    > on the element but it is not moved down so that the top is visible again.
    > Is there a way to force this?
    >


    It's not necessary having the iframe in a div.
    Try drop it and place its style in the iframe. I do not say
    this will correct the problem. But often a lot of nested divs
    displays the problem you have.
    se, Mar 25, 2014
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mmike
    Replies:
    0
    Views:
    546
    mmike
    May 19, 2004
  2. Replies:
    4
    Views:
    345
  3. Replies:
    0
    Views:
    372
  4. oom
    Replies:
    15
    Views:
    479
    Alexander Schmolck
    Nov 7, 2003
  5. Replies:
    0
    Views:
    279
Loading...

Share This Page