Answers for "height and width percentage css"

CSS
3

css size

#myID {
  height: 100px; /* Sets the height */
  width: 200px; /* Sets the width */
}
/* or... */
.myClass {
  height: 220px; /* Sets the height */
  width: 40px; /* Sets the width */
}
/* They both work! */
Posted by: Guest on June-25-2020
0

css width percentage

<div style="background-color:navy;">
  <div style="width:50%; margin-left:20%; background-color:chartreuse;">
    Width: 50%, Left margin: 20%
  </div>
  <div style="width:30%; margin-left:60%; background-color:pink;">
    Width: 30%, Left margin: 10%
  </div>
</div>
Posted by: Guest on November-09-2020

Code answers related to "height and width percentage css"

Browse Popular Code Answers by Language