Reply LinkBack Thread Tools Search this Thread
Old 02-01-2008, 23:48   #1 (permalink)
d3mcfadden
Senior Member
 
d3mcfadden's Avatar
 
Join Date: Apr 2005
Location: -
Posts: 694
Send a message via AIM to d3mcfadden
Weird one... pretty sure the answer is no

Is there CSS declaration to set all the contents / children of an element to no style?

Here is why I ask, I am building a CMS and when the user places and HTML field on the page there is a preview button to preview the entered HTML. The contents of the HTML field gets loaded into a preview div with javascript and displayed on the page.

All of my CMS styles are being applied to the users HTML... which fucks things up. I would like to be able to say:
HTML Code:
#htmlPreview * { NO STYLE / DEFAULT STYLE }

but have never heard of such a thing. I could go through and name out all the HTML elements and set all the attributes to default... but it seems there would be a better way.

I could also write come clever javascript that would parse each element in the preview pane and eliminate the style... but I would prefer to do it with CSS.

Thanks
  Reply With Quote
Old 06-01-2008, 23:38   #2 (permalink)
chriskalani
I have a computer
 
chriskalani's Avatar
 
Join Date: Nov 2006
Location: Washington
Posts: 98
Send a message via AIM to chriskalani Send a message via Skype™ to chriskalani
I don't think so dude. You just have to cancel out the styles yourself. Are you not able to edit the css directly and just get rid of it??
  Reply With Quote
Old 07-01-2008, 00:11   #3 (permalink)
Chris_Crew
me
 
Join Date: Nov 2007
Location: Runcorn
Posts: 47
Send a message via MSN to Chris_Crew
set everything in your style sheet to the div it is contained in

eg.


#body ul {
blah blah
}

instead of

ul {
blah blah
}

that should work if i am unstanding what is happening correctly
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8