Solved

Resizing calendar with CSS for mobile

Posted on 2014-12-04
2
215 Views
Last Modified: 2014-12-04
Hi, I have a calendar (datepicker) for my websites but when I want to resize the calendar for mobile, it gets to little in the desktop. I have this rule in my CSS file:
.ui-datepicker{width:16em; display:none}

Open in new window

but I need to have a separate rule for mobile where the calendar could be width:13em and maybe I could even control the size of the height.
Please help.

Thanks,

Jorge
0
Comment
Question by:Jorge Batres
[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 25

Accepted Solution

by:
Kyle Hamilton earned 500 total points
ID: 40480608
use a media query. In the example below, when the viewport is less than 600px wide, datepicker is set to width 13em

@media screen and (max-width: 600px) {
    .ui-datepicker{width:13em;}
}

Open in new window

0
 

Author Closing Comment

by:Jorge Batres
ID: 40480669
That did it! Thank you so much.

Jorge
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

707 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