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

Use of conditional stylesheets in RadEditor

1 Answer 35 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Paul Robertson
Top achievements
Rank 1
Paul Robertson asked on 26 Jan 2011, 06:07 PM
Hello there

I'm working on a RadEditor stylesheet at the moment, but unsurprisingly, I'm having trouble getting together an appearance that looks acceptable in both Internet Explorer and other browsers. Normally, I would use conditional [if IE] statements in the <head> section of a page. However, I don't think this approach is valid for styling the content of the iframe that the RadEditor uses - am I right in thinking that the markup for the control would not allow any such conditional loading of stylesheets through its <CssFiles> node. If not, the obvious answer is to apply CSS  hacks within a single stylesheet, but I try and avoid this whereever possible as usually it just stores up trouble for later, e.g., IE8 parses CSS hacks differently to other versions.
I'm wondering if anybody has suggestions about the best way of approaching this issue for RadEditor styling.

Thanks very much

Regards
  

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 Jan 2011, 01:45 PM
Hi Paul Robertson,

There are three means to style the content area of RadEditor:
1) By default, RadEditor automatically picks up the styles from the page where it resides
2) By setting the CssFiles property and loading an external css file
3) By loading HTML content which contain style tags.

It is up to the developer to decide how to style the content area using one of the above means.

I just want to add that you can use the following special CSS selectors to style the content area of RadEditor for a specific browser only:

*html .selector {color: #000;}  - IE6
*+html .selector {color: #000;}  - IE7
*|html .selector {color: #000;}  - all browsers except IE

Kind regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Editor
Asked by
Paul Robertson
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or