CSS Property Value How to - float: right;








Question

We would like to know how to float: right;.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.detail {<!--   ww w.j ava2s  . c o  m-->
  overflow: hidden;
  min-height: 50px;
  border: 2px dashed black
}

.myimg {
  float: right;
  width: 250px;
  min-height: 50px;
  margin-left: 10px;
  border: 2px dashed red
}
</style>
</head>
<body>
  <div class="myimg"></div>
  <div class="detail"></div>
</body>
</html>

The code above is rendered as follows: