-4

I'm involved in making bus booking sites project. I need to use the seats to book. So, can we replace checkbox with the image. If Possible, please tell me. Or, if there is any other possibility, please furnish me with ideas. Thnku.

Nana Partykar
  • 10,556
  • 10
  • 48
  • 77
  • 2
    is this what you were looking for? http://stackoverflow.com/questions/16352864/how-to-display-image-in-place-of-checkbox – Jascha Goltermann May 28 '14 at 09:16
  • 1
    Using google is always a possibility http://stackoverflow.com/questions/3772273/pure-css-checkbox-image-replacement -> http://jsfiddle.net/4huzr/ – SubjectCurio May 28 '14 at 09:17

1 Answers1

4

offer a simple solution to css DEMO

HTML

<input type="checkbox" id="checkbox-id" /> <label for="checkbox-id">Some label</label>

CSS

input[type="checkbox"] {
    position: absolute;
    left: -9999px;
}
input[type="checkbox"] + label {
    background: url(http://xandeadx.ru/examples/styling-checkbox/checkbox-sprite.gif) 0 0 no-repeat;
    padding-left: 20px;
}
input[type="checkbox"]:checked + label {
    background-position: 0 -32px;
}
AndrewWhite
  • 310
  • 1
  • 8