Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h3>Suggestion</h3> <p>Instead, you can initially have the PayPal button disabled and you can enable it once the user clicks on the checkbox.</p> <h3>HTML (jQuery Version)</h3> <pre><code>&lt;input type="checkbox" name="terms" onclick="$('#paypal').removeAttr('disabled');" /&gt; &lt;input type="image" name="paypal" id="paypal" disabled="disabled" /&gt; </code></pre> <h3>HTML (JavaScript Version)</h3> <pre><code>&lt;input type="checkbox" name="terms" onclick="document.getElementById('paypal').removeAttribute('disabled');" /&gt; &lt;input type="image" name="paypal" id="paypal" disabled="disabled" /&gt; </code></pre> <hr> <h3>Else if you insist on <code>z-index</code>:</h3> <p>You need to give <code>position: relative;</code> for <code>z-index</code> to work. And there is no negative <code>z-index</code>!</p> <pre><code>.with_zindex { background-color:#fafafa; opacity: .5; filter: alpha(opacity=50); -moz-opacity: .5; position: relative; z-index:1000; } .with_zindex + input[type=checkbox]:checked { position: relative; z-index: 0; } </code></pre> <hr> <h3>Your required answer</h3> <h3>HTML</h3> <pre><code>&lt;div class="with_zindex"&gt; &lt;input type="Checkbox" name="TOS" value="read"&gt; &lt;span class="catItemExtraFieldsValue"&gt; &lt;img src="http://gutgeordnet.de/reise/images/epaypal_de.gif"&gt; &lt;/span&gt; &lt;/div&gt; </code></pre> <h3>CSS</h3> <pre><code>.with_zindex {position: relative;} .with_zindex input[type=checkbox] { background-color:#fafafa; filter: alpha(opacity=50); position: absolute; z-index: 50; top: 10px; left: -35px; width: 135px; text-align: right; vertical-align: top; cursor: pointer; } .with_zindex input[type=checkbox] + .catItemExtraFieldsValue { position: relative; opacity: .5; -moz-opacity: .5; z-index: 45; } .with_zindex input[type=checkbox]:after { content: 'I accept'; font-size: 14px; vertical-align: top; line-height: 1em; font-weight: bold; font-family: tahoma; } .with_zindex input[type=checkbox]:checked {position: static; display: none;} .with_zindex input[type=checkbox]:checked + .catItemExtraFieldsValue { position: static; background-color: transparent; opacity: 1; -moz-opacity: 1; } </code></pre> <h3>Fiddle: <a href="http://jsfiddle.net/praveenscience/35cQz/" rel="nofollow">http://jsfiddle.net/praveenscience/35cQz/</a></h3>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload