css reset please don't reset contents style

Go To StackoverFlow.com

0

I'm using meyerweb css reset. It works fine, but it resets all default styles, which is in the body and template structure (<body>, sidebars, etc...) or in the main content (articles)

It's a big problem! because I've styled my text in the editor (TinyMCE), but on the main page, it loses all of the styles, such as strong, italic or (un)ordered lists.

How can I solve it? Can I said browser to reset all, expect tags which are in a <table> or <div> with a specific class or id (such as #content)?

Thanks.

2012-04-04 16:43
by mrdaliri
So what you're saying is you want a reset that doesn't reset things - Niet the Dark Absol 2012-04-04 16:44
look at the css and remove what you dont want to rese - Ibu 2012-04-04 16:46
Order matters in CSS selectors. Did you load TinyMCE's styles before or after the reset? The reset always goes first - Ben Brocka 2012-04-04 16:48
@BenBrocka: TinyMCE doesn't have any special styles, on final view (on the site). The problem is if I use simple tags on my WYSIWYG editor (such as <ul> or <ol>), css reset will kill the view - mrdaliri 2012-04-04 16:50
@Ibu: How? I want to clear <ul> default styles which is used in template, but keep <ul> styles which is used in the content - mrdaliri 2012-04-04 16:52
Usually, its assumed that after the reset, you define styles for everything. CSS resets don't style things for you, they simply remove all default styles - John Stimac 2012-04-04 16:55


5

You ran across one of the downsides of using reset sheets, in that they reset everything.

You may want to consider using an alternative to full resets, such as normalize.css. The idea behind this is that instead of having all browsers start off at a clean slate, get all of them to the same baseline. From the website:

What does it do?

  • Preserves useful defaults, unlike many CSS resets.
  • Normalizes styles for a wide range of HTML elements.
  • Corrects bugs and common browser inconsistencies.
  • Improves usability with subtle improvements.
  • Explains what code does using detailed comments.

This may (or may not) work better for you than the Meyer reset.

2012-04-04 17:06
by mpdonadio


0

The best way to go about this, in my opinion, would be to re-define the styles after the reset as opposed to removing them from the reset. While you shouldn't see any issues with the elements defined above, removing things like ul and li definitions can result in very inconsistent behavior across browsers. Redefining these elements post-reset will ensure uniformity across browsers.

2012-04-04 16:58
by chriseverson


0

Use http://CSSesta.tk

[It's influenced by YUI, Eric Meyer & Boilerplate but it doesn't interfear with any typical styling aspects]

It has 6 options commented out. (You only need to amend at least opt 3) you can leave change the others if necessary, the rest should be as expected (in general) unless you're making a website that turns into a car.(Things like forcing vertical scroll, line height, font-size are to your discretion)

The HTML5 elements in CSSesta are more up-to date "currently" than Eric Meyers & will probably become the most frequently maintained reset sheet, I know this because I will be updating it.

(Try it, & if you get any problems let me know I'll look at your default one and meet it in between)

2012-04-04 17:08
by Undefined
Ads