Solved

Booststrap two images depending on screen size

Posted on 2015-02-10
2
163 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

840 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