Mr.arrogant
Mr.arrogant

Reputation: 47

How to make the logo image visible?

Unable to view the logo image please help? I just want the logo to be displayed on the background image.

body {
  margin: 0px;
  padding: 0px;
  border: 0px;
}
#masterImg {
  height: 100%;
  width: 100%;
  position: fixed;
}
#masterImg img {
  height: 669px;
  width: 1366px;
}
#logo img {
  z-index: 10;
}
<div id="masterImg">
  <img src="img/masterImg1.jpg" alt="img1" / style="display:none">
  <img src="img/masterImg2.jpg" alt="img2" style="display:block" />
</div>
<div class="container" id="container">
  <div id="logo" style="background:transparent">
    <img src="img/logo.png" alt="logo" />
  </div>
</div>

Upvotes: 1

Views: 383

Answers (1)

Karl Dawson
Karl Dawson

Reputation: 977

You need to add position: relative to apply z-index

#logo img {
  position: relative;
  z-index: 10;
}

Upvotes: 2

Related Questions