-2

I have a select list and a div in a page. content of the div is depended on the list selected item and it is filled using javascript. I want div to stretch accordion to its content I don't mean the scrollbar,I mean changing in width and height of the div.

should I use javascript for doing it or it is possible using CSS ?

hd.
  • 17,596
  • 46
  • 115
  • 165

1 Answers1

1

As Sergey says, you can just set display: inline on the div to achieve this.

div{
  display: inline;
}​

http://jsfiddle.net/Qf9a8/

Doug
  • 3,312
  • 1
  • 24
  • 31