Flexible Images Flashcards
What css rule allows us to create fluid images?
img {
max-width: 100%;
}
We can apply max-width to other media (e.g. video, embed elements) to make them flexible. True or false?
True
img, embed, object, video, {
max-width: 100%;
}
What’s the difference between max-width: 100% and width: 100%?
max-width: means an item can take up to 100% of the containing element. Width means it’s 100% of the containing element.
What happens if an image is wider than it’s container?
It will break its container and bleed out to display all of the image
What Microsoft css filter can we use to address issues with artefacts in css scaled images?
AlphaImageLoader
.logo {
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=”sample.png”, sizingMethod=”scale”);
}
Apart from making our images flexible, what are other options for dealing with images that exceed their container
Use Css:
Overflow: hidden - This would hide parts of the image that did not fit their container.