Solved

Booststrap two images depending on screen size

Posted on 2015-02-10
2
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

636 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