2012-04-23 55 views
0

我是新的php和javascript。我在我的网页中使用jquery UI数据阅读器。我用这个日历如何更改jQuery UI样式(CSS)数据阅读器

http://jqueryui.com/download 

它的CSS代码是

<style type="text/css"> 
     /*demo page css*/ 
     body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;} 
     .demoHeaders { margin-top: 2em; } 
     #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;} 
     #dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;} 
     ul#icons {margin: 0; padding: 0;} 
     ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;} 
     ul#icons span.ui-icon {float: left; margin: 0 4px;} 
    </style> 

和HTML代码是:

<td>Required Date:</td> 
    <td> 
    <script> 
    $(function() { 
     $("#datepicker").datepicker(); 
      }); 
    </script> 



<div class="demo"> 

<p><input type="text" id="datepicker"></p> 

</div><!-- End demo --> 


<div class="demo-description" style="display: none; "> 
--some description 
</div><!-- End demo-description --> 
</td> 

现在的问题是这样的日历整个页面上实现的车身风格,同时我有我的网页的另一个CSS文件..如果我删除这个日历的身体风格,那么我的日历显示太大。 . i want the size of my calendar is same as mentioned in body style. what should i do.. please need help

回答

1

here - >http://jqueryui.com/demos/datepicker/点击主题,你会发现一些基本的类,你可以自定义它们。只是玩类,直到你的日期选择器看起来你需要的方式。如果您尝试过这种方法,但无法实现,请报告进展情况,我们会看到哪里出了问题。

+0

我对CSS有一点了解..我给了新的div到html代码并把字体大小放在这个新的div中。但那不起作用。 – maham 2012-04-23 07:43:41

+0

我已经通过使用'.ui-datepicker {font-size:9px;}'解决了我的问题''谢谢Oriesok Vlassky :) – maham 2012-04-23 07:55:33