Link to home
Start Free TrialLog in
Avatar of akohan
akohan

asked on

how to make a DIV to follow browser's size?


Hello group,

I have a div where it contains 1 or more paragraphs however, when user re-sizes the browser, the width of the div (or the text) does not change with the width of browser and stays as it was.

How can I set in a way to follow browser's new width?

using CSS.

Thanks,
ak

This is the CSS code currently I have:
 
 <div class="scroll">
 and ....
 
 
.scroll
{
  height:490px;
  width:1352px;
 
  font:14px arial;
  line-height:20px;
  border:outset;
  overflow:auto; 
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of akohan
akohan

ASKER


Thank you so much. I guess rather using px I have to stick to %.

Regards,
ak
percentages can be life saver sometimes :)

glad to have been of some help