Question : Checkbox next to <h1> element

Hello,

I want to have a H1 or H2 heading with a checkbox in front of it to collapse the section displayed after the heading. If I simply put a checkbox there, I get a line break before and after the heading automatically. Is there any way to have them at the same line, one next to other? This is to be done in pure HTML/XHTML+CSS, must work in MSIE, FF, Chrome. Thanks a lot

Answer : Checkbox next to <h1> element

<div>
  <h1></h1>
  <input type='checkbox'>
</div>

style
-------
div
{
   display:inline;
   display:inline-block;
}
Random Solutions  
 
programming4us programming4us