This is a migrated thread and some comments may be shown as answers.

RadCalendar Wrapper Style

3 Answers 101 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Darko
Top achievements
Rank 1
Darko asked on 24 Jul 2008, 03:59 PM
Hi there,

I'm having trouble with RadCalendar, I can't style my calendar input because the div created by the RadDatePicker tag apply "display: inline" to the container div (the wrapper) and I really can't figure out why the hell a server control should write inline style code into the tags! So the only way I can change that style is modifying it via javascript, but I can't, as my page has to be styled even on those device without JS.

Is there a way to force the component not apply that inline style??

Thanks.
d

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 24 Jul 2008, 05:17 PM
Hello Darko,

The DatePicker renders inline styles for its display CSS property because this control should behave like an inline-block element by specification, no matter what the skin is and whether a skin is present at all.

You can override this style quite easily by using a CSS declaration with the !important keyword:


.pickerWrapper_SkinName
{
     display: block  !important ;
}


Greetings,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Darko
Top achievements
Rank 1
answered on 24 Jul 2008, 08:43 PM
Hi, thanks for the answer, the problem with important is about IE6, yes, I know we shouldn't speak me about that crapy browser anymore, but customers and people still use it, so I have to style my pages supporting also IE6.

By the way, IE6 or not IE6, the thing is about putting that inline styles, I think it is a very dirty way to make things working, sorry but I have to be sincere. I can't understand why don't use CSS, it's clean, overrideable, exchangeable, compressable, and whatelse.

Sorry if I'm a bit rough, I think telerik is great, however.

I just can't see those messy, ugly, unuseful "style" attributes in my beloved tags :-(

darko
0
Dimo
Telerik team
answered on 25 Jul 2008, 11:47 AM
Hi Darko,

As I said earlier, RadDateTimePicker (as well as RadInput and RadComboBox) should behave like an inline-block element and its behavior should be the same, no matter whether an embedded skin is used, a custom skin is used, or no skin is used at all. That is why the important display CSS property is rendered in the control's tag as an inline style. We have decided to do it this way, rather than rely on clients to know what's this "inline-block" thing all about. Moreover, since browser support for inline-block display is inconsistent and partial, we actually render different inline styles for the different browsers. The alternative to this is to place some ugly CSS hacks in all skins and expect clients to understand and use them, which is not acceptable for us.

By the way, I was much of a CSS and web standards fanatic myself before starting to work for Telerik. Even though I still try to always adhere to standards, I have realized that sometimes rules and best practices need to be sacrificed in order to achieve certain functionality and make customers happy.

I hope you will understand our point of view now.


All the best,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Darko
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Darko
Top achievements
Rank 1
Share this question
or