CSS Property Value How to - position: fixed;








Question

We would like to know how to position: fixed;.

Answer


<!--  w ww  . j a va  2 s . c om-->
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#theDiv {
  position: fixed;
  top: 0px;
  right: 100px;
}
</style>
</head>
<body>
  <div id="theDiv">Example Div</div>
</body>
</html>

The code above is rendered as follows: