Adjust the Width of an Element Using the width Property
You can specify the width of an element using the width
property in CSS. Values can be given in relative length units (such as em
), absolute length units (such as px
), or as a percentage of its containing parent element. Here's an example that changes the width of an image to 220px:
img {
width: 220px;
}
Add a width
property to the entire card and set it to an absolute value of 245px. Use the fullCard
class to select the element.
Tests
- Waiting: 1. Your code should change the
width
property of the card to 245 pixels by using thefullCard
class selector.
/** * Your test output will go here */