0

In bootstrap css how does one fit an image or video automatically to all mobile devices based on its Resolution.

1 Answer 1

1

For images, use Bootstrap's Responsive Images functionality. For video or embedded content, use Bootstrap's Responsive Embed to preserve the aspect ratio.

Example (JS Fiddle):

<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/%C3%84lvkarleby_June_2013.jpg/800px-%C3%84lvkarleby_June_2013.jpg" class="img-responsive"> <hr> <div class="embed-responsive embed-responsive-16by9"> <iframe class="responsive-embed" src="https://www.youtube.com/embed/SirRu8mf3II" > </iframe> </div> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.