CSS Property Value How to - overflow: hidden;








Question

We would like to know how to overflow: hidden;.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {<!-- w  ww .jav a  2 s  .co m-->
  border: 1px solid black;
  width: 70px;
  white-space: nowrap;
  margin: 1.00em 0;
}

.hideExtraBits {
  overflow: hidden;
}

.preOnly {
  white-space: pre;
}
</style>
</head>
<body>
  <div>this is a test</div>
  <div class="hideExtraBits">this is a test</div>
  <div class="preOnly">this is a test</div>
</body>
</html>

The code above is rendered as follows: