Solved

Resize image differently for phone and computer

Posted on 2013-11-17
2
188 Views
Last Modified: 2013-11-18
How do I resize an image differently for phone and computer?
0
Comment
Question by:burnedfaceless
2 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39656330
In your css, you can use media queries https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries

@media (max-width: 768px) {
  img {
    width:700px;
  }
}
@media (min-width: 768px) {
  img {
    width:900px;
  }
}

Open in new window

In the above, if the viewport is below 768 one a smaller width is used, in the larger screen a larger width is used.
0
 

Author Closing Comment

by:burnedfaceless
ID: 39657417
Thank you for the link and the example
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Recently, we decided that in order to stay competitive in today's IT world, we were going to have to develop and deploy a mobile app for our users and do it quickly. We felt that we were already behind the curve. Users of technology today are mov…
Read about why website design really matters in today's demanding market.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now