DIV box width problem

Results 1 to 2 of 2

Thread: DIV box width problem

  1. #1
    Join Date
    Dec 1969

    Default DIV box width problem

    Hello, <BR><BR>I have a DIV box containing SPANs and I want to set its width to the width of the largest SPAN. I am currently using this technique, which takes the value of the largest child of the DIV : <BR><BR>div.style.width = &#039;&#039;;<BR><BR>Works well in IE5.5 and IE6, but in IE5.0 and IE5.01 the DIV becomes as large as the screen because instead of taking the width of the largest CHILD it takes the width of the PARENT.<BR><BR>Anyone knows what I could do so that it works in all versions ? Note : I have no way in advance to know the width of the text in the box.<BR><BR>Thanks in advance !

  2. #2
    Join Date
    Dec 1969

    Default RE: DIV box width problem

    sorry, don&#039;t know what you mean. probably more an HTML/CSS q than a JScript Q.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts