I am fairly new to CSS and have a question about specifying units in the code below. Without specifying units for height and width, the text fits on one line. However, once I add 'px', the text occupies two lines instead. Can anyone explain what happens when no units are specified?
HTML:
<figure class="hat">
<img src="http://media.goorin.com/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/imports/products/100-3333-BLK-F01.png" width="100" height="100">
<figcaption>A picture of a hat</figcaption>
</figure>
CSS:
.hat {
position: relative;
height: 100;
width:100;
}
.hat figcaption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}