wpengine

wpengine

Welcome, Guest
Username: Password: Remember me

TOPIC: Bootstrap and Animate it!

Bootstrap and Animate it! 9 years 8 months ago #117

  • Cody
  • Cody's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: -7
Hi,

First off, like your plugin. Great job! I'm using the plugin in Wordpress (most up-to-date) with the current version of Themeum's Starter theme. The Starter theme is based on bootstrap, and mostly just adds a few plugins for shortcode.

Now, I'm having a trouble with the Animate It! plugin interfering with bootstrap modals. I've built these using basic Bootstrap best practices, and they aren't being inserted via shortcode from Themeum, but rather I'm using the bootstrap classes that are already built into the theme.

Anyway, when I open a modal, it is being pushed behind various divs within the page (some images, text, the div controlling the "light box effect"). This seems to be related to the Animate It!'s use of bootstrap classes as well. I've included a screen shot of what I mean (one with the plugin active and one without the plugin active).

Unfortunately, the whole site is hosted locally right now, so I can't give you access. But, if you need to see any particular part of my code let me know.

This is the code for my modal (for example, wrap in a row div with three other col-md-4 sub divs):
<div class="col-md-4 animated fadeIn delay3 duration3 eds-on-scroll"><div id="IndonesiaMap" class="center-block" data-toggle="modal" data-target="#IndonesiaModal" /></div>

<button type="button" class="btn btn-default btn-sm center-block team-btn" data-toggle="modal" data-target="#IndonesiaModal">
  Indonesia: Regulatory Outlook
</button>

<div class="modal fade" id="IndonesiaModal" tabindex="-1" role="dialog" aria-labelledby="myIndonesiaLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myIndonesiaLabel">Indonesia: Regulatory Outlook</h4>
      </div>
      <div class="modal-body text-left">
        <p class="well"><img class="img-casestudy img-thumbnail" src="http://localhost/wordpress_2/wp-content/uploads/2015/03/Indonesia-400px.png" width=40%>Horizon has provided its clients including super-major, major and independent IOCs with a special report on Indonesia’s oil and gas regulatory environment that focused on SKK Migas. The report analyzed the regulator’s past and present leadership, focusing on Amien Sunaryadi, who was appointed by President Joko Widodo to head SKK Migas. The report assessed the functions of and outlook for SKK Migas’s major units – planning, operations, commercial affairs and business support – and the deputies who run them. The report also provided insights into potential restructuring of SKK Migas, its interaction with other government institutions and implications for IOCs.</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-small" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
</div>
The administrator has disabled public write access.

Bootstrap and Animate it! 9 years 8 months ago #118

  • Cody
  • Cody's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: -7
I'm not sure why my screen shots aren't showing up.
Active plugin screen shot: drive.google.com/file/d/0Bx8QScV4_wdqMzd...a0E/view?usp=sharing
Inactive plugin screen shot: drive.google.com/file/d/0Bx8QScV4_wdqSHZ...aTg/view?usp=sharing
Last Edit: 9 years 8 months ago by Cody. Reason: no screen shots attached??
The administrator has disabled public write access.

Bootstrap and Animate it! 9 years 8 months ago #119

  • eLEOPARD
  • eLEOPARD's Avatar
  • Offline
  • Administrator
  • Posts: 409
  • Thank you received: 54
  • Karma: -28
Dear Cody,

From what I see in the Google Drive shared screens, I believe you have a z-index issue.
Generally the modal elements have a greater z-index, hence they are making the modal stay behind the background.

Try adding this CSS to theme's style.css and see if the issue is fixed:
.animated{
    z-index: 999999;
}

It would really be more helpful if the website would be accessible to get a better look into the issue.
However, this is my best guess. Please let me know if that works.
The administrator has disabled public write access.

Bootstrap and Animate it! 9 years 8 months ago #120

  • Cody
  • Cody's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: -7
Thanks! Sorry that I cannot put the site online right now.

Anyway, the z-index issue is def part of the problem. The modal container (which is not visible until activated) was within an animated div, and thus inheriting it's z-index. A simple solution was to move the modal container (not the modal call button), outside the animated div. Essentially, the modal container can go anywhere on the page, it just needs to be outside any div being animated, even if its call is with the animated div.

This stactoverflow discussion captures the concept well.
Last Edit: 9 years 8 months ago by Cody. Reason: typos
The administrator has disabled public write access.
Time to create page: 0.205 seconds

Need Customization? Feel free to...

Contact Us

If you like these extensions, help us buy Yoga Mats :)