gumper gumper - 5 months ago 10
CSS Question

set the div to position:relative from position:absolute; when using turn.js

this is a simple question, I've just started using the turn.js library and want to relatively position image elements with reference to a container div, to do this, it would look something like:

<div id="cont" style="position:relative;">//this div acts a page
<img src="my.jpg" style="position: absolute; top:40px; left:50px;">

the div, using the library, would serve as the page to be flipped, the problem is that whenever i set the container div to position relative, it gets turned into position absolute automatically by the turn.js library when the page loads, is there a way to ensure that the divs which get turned into pages all have position:relative; instead of position:absolute;? Thank You in advance.


Try this hope this may solve your problem

#cont {
  position:relative !important;