not able to do max width

Posted by Pradyut Bhattacharya on Stack Overflow See other posts from Stack Overflow or by Pradyut Bhattacharya
Published on 2010-03-24T20:47:17Z Indexed on 2010/03/24 20:53 UTC
Read the original article Hit count: 594

Filed under:
|

Hi

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

<div id="content">
testingtestingtestingtestingtestingtestingtestingtestingtesting
testingtestingtestingtestingtestingtestingtestingtesting
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

Are there any JavaScript solutions?
Any help
thanks
Pradyut

© Stack Overflow or respective owner

Related posts about css

Related posts about max-width