Page Widget How to - Create Minihome banner








Question

We would like to know how to create Minihome banner.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.tie-title {<!--   www .  ja v a 2  s  .  com-->
  overflow: hidden;
  position: relative;
  height: 150px;
  width: 570px;
  margin: 0;
  padding: 0;
}

.tie-title img {
  z-index: 0;
}

.tie-title h2 {
  position: absolute;
  left: 5%;
  bottom: 5%;
  z-index: 1;
  color: #fff;
  font-size: 19.5px;
  font-weight: 400;
  width: 78%;
}
</style>
</head>
<body>
  <div id="tie-title" class="tie-title">
    <h2>Science</h2>
    <img src="http://placehold.it/600x200" />
  </div>
</body>
</html>

The code above is rendered as follows: