Solved

Resizing calendar with CSS for mobile

Posted on 2014-12-04
2
203 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
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

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

Title # Comments Views Activity
Sums of coloumns in html/java 15 65
How to avoid jquery conflicts in Wordpress ? 4 24
Divi Them Help with Full Width header 20 13
Not seen Link button 5 14
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

23 Experts available now in Live!

Get 1:1 Help Now