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
Solved

Resizing calendar with CSS for mobile

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

856 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