Home > other >  How can i add background image as a Logo for my html heading
How can i add background image as a Logo for my html heading

Time:04-06

How can I add a background image for my heading(site name) ?

ps: I am only using html and css.

CodePudding user response:

Do you want something like this?

.wrapper {display:flex; flex-direction:row; align-items: center; font-size:40px;}
.wrapper span {margin:20px;}

.logo {height:100px; width:100px; background:url("https://picsum.photos/100/100");}
<div >
  <div ></div>
  <span>My Website</span>
</div>

CodePudding user response:

From what I understand from your description

.head_back {
  background-image:url('http://commondatastorage.googleapis.com/codeskulptor-assets/lathrop/nebula_blue.s2014.png');
  padding:5px;
}

.heading {
  color:yellow;
}
<div >
  <h2 >My Website</h2>
</div>

  • Related