@misterhtmlcss I want to know how it works. In the test pen I linked what I was trying to achieve was achieved already, which is have an image fit the screen using bootstrap’s image-responsive class, and have the image have no margins on the sides.
So to clarify, I have basically asked two questions:
1- why it doesn’t work if I put the class img-responsive on the div element instead of the img? This question is answered already by PortableStick. It’s because this will make the div fit the screen, but not the image inside the div, because “mage elements, by default, do not scale to their parent’s dimensions.”.
2- why it doesn’t work if I put the class no-margin on the img element instead of the div? This question at least for me remains unanswered. I’m not sure why that happens yet. I know that the image would have -15 margin in relation to its parent, the div, instead of the div having no margin in relation to its own partent, the other div. But I don’t see why this would change the effect.
@descadora Sorry but I didn’t quite get what you mean with your analogy.