Solved

Booststrap two images depending on screen size

Posted on 2015-02-10
2
159 Views
Last Modified: 2016-02-25
Hi, If I have an image that goes across the whole screen, like here:  diabetic-meals.net/responsive/index.html

And if it had text on the image, I would want it to be the same image for large and medium screens, but when it got to cell-phone size, I'd like to put a different image there. How do I go about that? Thanks, I can't seem to google search this with the right question.
0
Comment
Question by:mel200
2 Comments
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 40602806
Without Bootstrap, you would put two images in the page with different classes, then use a media query to set style "display: none;" or "display: block;" ("display: auto;" might work better than block?) so that only one of them displays at once.

Using Bootstrap 3,  I think you can just apply style "display: none;" and class "visible-xs" to the image for phones, and class "hidden-xs" for the image for everything else. Docs for this: http://getbootstrap.com/css/#responsive-utilities
0
 

Author Closing Comment

by:mel200
ID: 40603183
That's what I was looking for, thanks!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question