Month: September 2020

Blog

No library HTML+CSS+JS Confirm Dialog

Made an HTML+CSS+JS (JavaScript) confirm dialog today without using any external library. No jQuery!

HTML:

<a class="button button-success btn-show-confirm">Show confirm</a>
<div class="confirm dummy">
  <div class="contents">
    <div class="title">Confirm Message</div>
    <div class="message">Are you sure?</div>
    <div class="buttons">
      <a class="button button-success btn-yes">Yes</a>
      <a class="button 
Blog

CSS Disable Checbox

Today, I needed to disable checkbox using CSS only without any HTML attribute.
Here is the code:

HTML:

<input type="checkbox" checked="checked" />
<!-- using opacity -->
<input type="checkbox" checked="checked" />
<!-- using layer -->
<input type="checkbox" checked="checked" />

CSS:

input[type="checkbox"]:nth-child(2)