Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Resizing calendar with CSS for mobile

Posted on 2014-12-04
2
Medium Priority
?
220 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

604 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