I want to know how to make an adjustable div container which adjusts its own width and height according screen its being displayed in laptop, netbook or desktop. It must be so that no text under or overflows its container and no white spaces are left within the container.
I tried using % or em but since its based on base font-size 16px there are occasion in smaller netbook screen where the text overflows or in bigger screen desktop where there are whitespaces left in the bottom of container.
Any suggestions would be greatly appreciated.
<style type="text/css">
.tt
{
border: 2px solid red;
height: 80px;
width: 168px;
font-size: 16px;
padding: 0px;
}
</style>
</head>
<body>
<div class="tt">
Hello World Hello World<br>
Hello World Hello World<br>
Hello World Hello World<br>
Hello World Hello World<br>
</div>
</body>