Hi

I have a page which has a content like this...

<div id="content">
     testingtestingtestingtestingtestingtestingtestingtestingtestingtestingtestingtestingtestingtestingtestingtestingtesting
testingtestingtestingtestingtesting
    </div>

How do i apply a max-width on it . I m using this code in the css

#content {

                    max-width:50px; /* for standards-compliant browsers */
                    /*width:expression(document.body.clientwidth > 650? "650px": "auto" );*/ /* max-width expression for IE only */
                }

but i m not getting the results in firefox...
http://pradyut.dyndns.org/WebApplicationSecurity/width.jsp

Any help
thanks
Pradyut

1 answer

0
points

I just tested your page out in Chrome 4 and FF 3.6, and everything seemed to be working. Could you be more specific about what is going wrong?

Answered over 6 years ago by Joshua Clanton
  • It's an IE specific problem since Chrome and FireFox aren't going to do anything with that second bizarre declaration. Nathan Duran over 6 years ago
  • well just fixed it before your reply... the max-width will not work on any browser without the css word-wrap: break-word; pradyut over 6 years ago