Welcome Guest Search | Active Topics | Sign In | Register

External css doesn't show selected date image Options
breese
Posted: Tuesday, September 25, 2007 3:07:48 AM
Rank: Newbie
Groups: Member

Joined: 9/24/2007
Posts: 9
I have setup an external css file to control my datepicker controls, everything works as expected except for anything which uses the background-image:url('8_Digit_number_here'); property. For some reason, these images will display when I put the CSS ON the actual page, but they won't work when the css is in an external .css file. Again, everything else except for the images display properly.

Also, one other thing... Is there a way to make the external css file automatically control the properties of the datepicker, so I don't have to explicitly tell it <SelectedDayStyle CssClass="dpSelectedDay"/> ? For example, with the ASP.NET button control, I could set my css file to have a .button element. Any time a button is on the page, it will automatically format the button as described in the .css file, without me explicitly setting this in the button's properties.

This is how I tell my control which part of the css file to use
Code: HTML/ASPX
<SelectedDayStyle CssClass="dpSelectedDay" />
            <DisabledDayStyle CssClass="dpDisabledDay" />
            <CalendarStyle CssClass="dpCalendar" />
            <TitleArrowStyle CssClass="dpTitleArrow" />
            <DayHoverStyle CssClass="dpDayHover" />
            <MonthStyle CssClass="dpMonth" />
            <TitleStyle CssClass="dpTitle" />
            <DayHeaderStyle CssClass="dpDayHeader" />
            <DayStyle CssClass="dpDay" />


This is in my external CSS file:
Code: CSS
.dpToday { font-family:Verdana;font-size:8pt;background-image:url('00040401');color:#1176db; }
.dpDay { font-family:Verdana;font-size:8pt; }
.dpSelectedDay { font-family:Verdana;font-size:8pt;background-image:url('00040403');color:Brown; }
.dpDisabledDay { font-family:Verdana;font-size:8pt;color: gray }
.dpCalendar { background-color:white;border-bottom-color:Silver;border-bottom-style:solid;border-bottom-width:1px;
	border-left-color:Silver;border-left-style:solid;border-left-width:1px;border-right-color:Silver;
	border-right-style:solid;border-right-width:1px;border-top-color:Silver;border-top-style:solid;border-top-width:1px;
	color:#2C0B1E;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px; }
.dpTitleArrow { cursor: hand }
.dpDayHover { font-family:Verdana;font-size:8pt;background-image:url('00040402');color:#1c7cdc; }
.dpMonth { cursor:hand;margin-bottom:0px;margin-left:4px;margin-right:4px;margin-top:0px; }
.dpTitle { font-family:Verdana;font-size:8.75pt;padding-bottom:5px;padding-left:5px;padding-right:5px;padding-top:5px; }
.dpDayHeader { font-family:Verdana;font-size:8pt;border-bottom: #f5f5f5 1px solid; }
eo_support
Posted: Tuesday, September 25, 2007 6:51:43 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You can not use built-in image IDs in .css file. Those are special items that we parse and replace. But it is only done when you use CssText, when you put it in .css file, we take a hands off approach and do not attempt to do anything special.

In order to use built-in image that way, you want to get the real image files (all images files are inside images.zip in your installation folder) and use the real image file.

As for your second question, ASP.NET button does not automatically uses "button" class --- in another word, the connection is not done by the control itself. Someone may have setup a skin for your project. The same can be done with our Calendar, but it is much more complicated because our Calendar is a very complicated control. Please see my other post for details.

http://www.essentialobjects.com/Forum/Default.aspx?g=posts&t=506

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.