PDA

View Full Version : undo reset.css



INeedADip
16 Nov 2006, 10:14 PM
I've applied the reset.css and fonts.css to my site. They work very
well and I'm grateful...but....

I have a section on my site where users submit their own HTML.. Is
there any way I can 'un-apply' the reset and font.css for that
particular section (div) or the page entirely? I know the first answer
is "Don't add those css files to the page", but they are added globaly
in a header file. Like I said, they work great on all the other pages.

How do I 'un-apply' these css files for a section or page? Is it even
possible?

I can change the border-collapse and what not to something else, but
when the users submit tables with cellpadding and/or cellspacing in
their HTML, it just doesn't get applied.

Any suggestions would be greatly appreciated.

I've included your extension on my site and am using many of them with great success like the Tab (which is far better then Yahoo's new one), DomHelper, and all your helper functions in the Element class. I posted this in the YUI group, but they aren't very good at answering questions. I've been looking at your YAHOO.ext.util.CSS and am wondering if that is something I am looking for.

jack.slocum
16 Nov 2006, 10:55 PM
You can look up the default for each of the elements (not a good solution). If all you want is a couple, you could do something like this:

.noreset td {
padding:3px;
}

.noreset ul {
list-style:inside disk;
margin:10px;
}

etc.

There aren't many that you need to do to make default CSS work at least close to expected.

Then you'd add noreset class to the parent of the customizable HTML block. It could even be the body element.

INeedADip
17 Nov 2006, 9:31 AM
Good point....I only need it to look similar.
I actually attempted this at first, but I was having a problem with tables.

My users use cellspacing and cellpadding all the time. How do I "enable" those properties again? They seem to have no effect after the reset.css is applied.

jack.slocum
17 Nov 2006, 8:20 PM
Oh I see what you mean. Yes, it would be completely ignored. I can't think of a way around it, other than making an edit to reset.css and removing the TD change (and then adding a less global version in your site's stylesheet).

You could also try auto. Who knows that might work.

.noreset td {
padding:auto;
}