I have an asp.net site that uses a master page, the stylesheet is ref'd here as well. One of the pages that uses the master page has a Textbox w/ HTMLEditorExtender.
How can I remove any inherited CSS styling from the extender? Ive tried jquery .removeClass and adding blank styling directly on the page. Looking at the textbox @ runtime shows an empty string for the cssclass property. The extender doesnt seem to have
the same property. The only way (so far) that I have been able to get this to work is by commenting out the css (or not have the page use the master page).
The blockquote and paragraph elements are giving me the most grief.
You may use tools to find out what CSS properties are applied. For example, if you are in Chrome, press F12 -> Elements panel. You may see current CSS properties in the right side part in this panel. What you may do next is to find the undisired properties,
for example you dont want borders of an icon. Then, locate this icon, see if its border is 1px then in your own style sheet, override it by, for example .the_icon { border: 0 }
Yes, I have already identified which elements are in question and where they are being formatted at.. The Extender control has no CSSclass/style property to assign an overridden class. Ive tried it on the textbox previously, with no luck.. The extender still
inherits the CSS ref'd in the master page.
I suppose I could convert the styling for the blockquote into a class in which I have the block quotes in my all of pages use.. But then that seems like a lot of refactoring to just include a single control, elsewhere.
i had a similar problem with the default layout of a new webapplication with in vs 11 , i wanted to shorten the white space of the page tag in the masterpage , which was defined by the min lenght style rule in the css, by changing that with jquery setting
a new css min lenght property of the tag worked, but changing the attribute in the tag itself didnt work
StevenSchult...
Member
19 Points
7 Posts
HTMLEditorExtender and CSS issue.
Feb 20, 2012 10:09 PM|LINK
I have an asp.net site that uses a master page, the stylesheet is ref'd here as well. One of the pages that uses the master page has a Textbox w/ HTMLEditorExtender.
How can I remove any inherited CSS styling from the extender? Ive tried jquery .removeClass and adding blank styling directly on the page. Looking at the textbox @ runtime shows an empty string for the cssclass property. The extender doesnt seem to have the same property. The only way (so far) that I have been able to get this to work is by commenting out the css (or not have the page use the master page).
The blockquote and paragraph elements are giving me the most grief.
<script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script><script type="text/javascript"> $(function() { $('blockquote').removeClass(); $('blockquote:before').removeClass(); $('blockquote:after').removeClass(); $('blockquote:hover').removeClass(); $('p').removeClass(); </script>BU XI - MSFT
All-Star
22367 Points
2704 Posts
Microsoft
Re: HTMLEditorExtender and CSS issue.
Feb 22, 2012 01:08 AM|LINK
Hello
You may use tools to find out what CSS properties are applied. For example, if you are in Chrome, press F12 -> Elements panel. You may see current CSS properties in the right side part in this panel. What you may do next is to find the undisired properties, for example you dont want borders of an icon. Then, locate this icon, see if its border is 1px then in your own style sheet, override it by, for example .the_icon { border: 0 }
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
StevenSchult...
Member
19 Points
7 Posts
Re: HTMLEditorExtender and CSS issue.
Feb 22, 2012 12:12 PM|LINK
Yes, I have already identified which elements are in question and where they are being formatted at.. The Extender control has no CSSclass/style property to assign an overridden class. Ive tried it on the textbox previously, with no luck.. The extender still inherits the CSS ref'd in the master page.
I suppose I could convert the styling for the blockquote into a class in which I have the block quotes in my all of pages use.. But then that seems like a lot of refactoring to just include a single control, elsewhere.
Thanks for your reply.
wetlip
Member
385 Points
257 Posts
Re: HTMLEditorExtender and CSS issue.
Feb 23, 2012 07:33 AM|LINK
i had a similar problem with the default layout of a new webapplication with in vs 11 , i wanted to shorten the white space of the page tag in the masterpage , which was defined by the min lenght style rule in the css, by changing that with jquery setting a new css min lenght property of the tag worked, but changing the attribute in the tag itself didnt work