tags:

views:

12

answers:

1

i am placing the content in p tag. i am specified the width and height of the p tag initially.When the content appends dynamically,The content may be large and it overflows to the p tag. but i am abserved in case of IE it is automatically increase the p size when content overflow occurs.But incase of other browsers content will be appended outside the p tag. What is the solution for these browsers for automatic resize the tag.

A: 

Set a min-width and min-height on the <p> tags instead of height and width:

p {
    min-height: 100px;
    min-width: 100px;
}

Earlier versions of IE will helpfully ignore these properties...so you'll need to continue setting height and width in an IE only style sheet:

p {
    /* behaves like min-height in IE */
    height: 100px; 

    /* min-width css expression */ 
    width: expression(this.width < 101 ? "100px" : this.width);  
}
Pat