1

I am new to html and this is the assignment that I am working on. When I set the width of the green box to be 50% or 30px, the width of it does not change. Does anyone know how to solve this issue?

.topcorner {
  position: absolute;
  top:0;
  right:0;
  border: 1px solid black;
  text-align: center;
  width: 50%;
  height: 50%;
}

https://jsfiddle.net/7Lhmzj91/

Roy Xu
  • 197
  • 1
  • 3
  • 14

1 Answers1

3

Solution 1

Change the width of the Item 1 at content in your css

#content {
  width: 50%;
  background-color: #90EE90; /* green */
} 

Solution 2

Remove the width property from content

#content {
  background-color: #90EE90; /* green */
}

Read more about Selectors here

hbamithkumara
  • 2,344
  • 1
  • 17
  • 17