Solved

Resizing calendar with CSS for mobile

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

746 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

12 Experts available now in Live!

Get 1:1 Help Now