Answers for "css background div size and color"

CSS
2

how to give 2 different background color css

background: repeating-linear-gradient(#74ABDD, #74ABDD 49.9%, #498DCB 50.1%, #498DCB 100%);
Posted by: Guest on October-14-2020
1

html background size fit text

<div class="myDiv">
    <div class="bgImage">
        <h1>My Image</h1> 
    </div>
</div>

<style>
.myDiv {
	text-align: center;
}
.myDiv h1 {
  display: inline-block;
  font-size: 3.5em;
  border-radius: 20px;
  background: rgba(43, 166, 203, 0.5); /* alpha value for background */
  padding: 0.5em 0.2em 0.8em 0.5em;
}
</style>
Posted by: Guest on November-23-2020

Code answers related to "css background div size and color"

Browse Popular Code Answers by Language