mercredi 6 mai 2015

DOM element not displaying when position:absolute

I'm using jQuery Mobile 1.4.5. I have an element that is not displaying, under the following conditions: 1. Its CSS position is "absolute" 2. It is in the DOM under a JQM "grid":

<div class="ui-grid-a">
  <div class="ui-block-a">
    <div class="tt_autocomplete_wrap">
       <ul class="jqm_autocomplete ui-listview ...bla >
          <li class="ui-first-child" >
            <a class="ui-btn ui-btn-icon-right ui-icon-carat-r" href="#">Not Seen If Absolute</a>

See the details here: http://ift.tt/1JrmrDj

If the CSS position of the .jqm_autocomplete element is set to "absolute", the first element in the demo does not display. I've left it displaying in the fiddle, but uncommenting the line shows the problem:

.jqm_autocomplete {
  /* uncomment the next line to see the problem */
  /*    position: absolute; */

However: it is positioned correctly - it can be seen using the developer tools in outline form, exactly where it should be. And its z-axis position is also in front of everything.

I can't see any difference in the computed styles of the working and non-working elements, but am I missing something?

Aucun commentaire:

Enregistrer un commentaire