[i assume this was for the list, so i'm replying back on-list for the archives.]
On 10/23/06, Les Mizzell <[EMAIL PROTECTED]> wrote:
> cj wrote:
> > if i'm reading you right, you're asking "how do i reset all styling
> > for this <p> so the customer has a "clean slate"?".
>
> I have a CSS file I use for every single site that sets all attributes
> to a default "starting" value that I then work from, but this would be
> different - it need to set everything to a "default" value - basically
> making it appear as if no CSS has been applied to a HTML document.
>
> So, basically this:
>
> #noCSS A:link {color:blue;text-decoration:underline;}
> #noCSS H1 {font-weight:bold;font-size:26pt;}
> #noCSS H2 {font-weight:bold;font-size:20pt;}
> #noCSS H3 {font-weight:bold;font-size:14pt;}
> #noCSS H4 {font-weight:bold;font-size:12pt;}
> #noCSS H5 {font-weight:bold;font-size:10pt;}
> #noCSS H6 {font-weight:bold;font-size:8pt;}
> #noCSS B, STRONG {font-weight:bold;}
> #noCSS #noCSS I, #noCSS EM, #noCSS CITE, #noCSS DFN, #noCSS VAR
> {font-style:italic;}
> #noCSS U, #noCSS INS {text-decoration:underline;}
> #noCSS S, #noCSS STRIKE, #noCSS DEL {text-decoration:line-through;}
> #noCSS SMALL {font-size:smaller}
> #noCSS BIG {font-size:larger}
> #noCSS ADDRESS {font-style:italic}
> #noCSS PRE {font-family:courier}
>
>
> OK - but what if there's a font-size defined somewhere up in the page
> for all paragraphs. How to avoid that getting inherited into the "noCSS"
> div?
i can think of a couple ways, neither of them pretty. css is meant to
cascade (hence the name!), so resetting an area of the page isn't
built in.
1. pick a browser you like and grab their css rules for the elements
that the browser styles with absolutely no code from you. go through
that file and basically do a smart copy/paste into your css for this
area.
2. have absolutely no css that you code yourself applies to this no
css part. by this i mean that every other thing you want to style on
the page that could possibly overlap with the nocss part needs to be
explicitly named so that you can access it by class (or id) name in
your css file. this might give you a lot of extra classes, but it
will keep that nocss part clear of any styling you have personally
done.
i think the second one there is better because all browsers style
elements differently, and that option allows the browsers to continue
doing so.
hth.
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/