Css styling when click on checkbox

css

I want to style the div#main in the following code when I click on the checkbox inside it. Can I do this using only css/css3? Thank you in advance!

<div id="main">
<div id="content">
<input type="checkbox"/>
</div>
</div> 

Best Answer

You can play with HTML & css. Write Like this:

<input type="checkbox" id="change"/>
<div id="main">
<div id="content">
<label for="change"></label>
    <h2>hello</h2>
</div>
</div> 

CSS

#main{
  width:100px;
  height:100px;
  background:red;
  text-align:center;
}
input{
    display:none;
}
input:checked ~ #main{
    border:2px solid green;
    font-size:24px;
    background:yellow;
}
input:checked ~ #main label{
    background:url(http://farm6.static.flickr.com/5182/5840005274_b3bcc52bb1_o.png);
}


label{
    background:url(http://farm3.static.flickr.com/2793/5839457953_1690178a65_o.png);
    display:block;
    width:18px;
    height:18px;
}

Check this http://jsfiddle.net/j5nTx/