0

I had reset my css with a reset css (likely normal) but recently im using a wysiwyg plugint (textarea plugin) and everytime I insert an ul or ol list the disc or numbers dont appear, because the list-style:none; I have added a new div surrounding the textarea and making in the css file something like

.divsurrondig ul{list-type:disc; border:1px solid red;}

the red color appear everytime I insert a new list with the widget but no! bullet appear, do you know how can I reset the list style for show the bullets/numbers?

ncubica
  • 8,169
  • 9
  • 54
  • 72

2 Answers2

1

Try adding !important to the rule.

.divsurrondig ul{list-type:disc !important; border:1px solid red;}
John Conde
  • 217,595
  • 99
  • 455
  • 496
  • If you have to add `!important` you're doing it wrong. Only use it to see if it works - if it does, refactor your order of operations. – AlienWebguy May 14 '12 at 00:55
  • @AlienWebguy I wouldn't necessarily agree. !important is there for a reason. – Ashley Strout May 14 '12 at 00:56
  • I guess I found the answer is because I have to add the li after the ul :P – ncubica May 14 '12 at 00:59
  • btw I tryed the !important before to post the question, and doesnt works... – ncubica May 14 '12 at 01:00
  • @David there are lots of cases where code exists but should be avoided most of the time. `eval()` in JS, `extract()` in PHP, `!important` in CSS. Anything in code which basically gives the middle finger to semantics should be a red flag and avoided whenever possible. – AlienWebguy May 14 '12 at 05:18
0

What you have here is a problem of precedence. you should try to apply a more specific css selector to the list and not just blindly set !important to the rule. having too many !important will make debugging difficult in future, when you will be trying to figure out why this css is not being applied. only to finger out the a important gag has been set a long time ago.

You can read this for some details on css precedence... http://www.vanseodesign.com/css/css-specificity-inheritance-cascaade/

iWantSimpleLife
  • 1,944
  • 14
  • 22
  • thanks for the answer man, actually is not a precedence problem, this is because at the beginning of the css I'm applying the http://meyerweb.com/eric/tools/css/reset/ reset method. And actually the solution is quite simply .container ul li{list-style-type:disc}. Thanks for the link also. – ncubica May 14 '12 at 07:02
  • Hey. THIS IS precedence problem. Ha ha. what you did was give a more constraining css selector. Eric's reset.css uses very general selector, so you can write more specific css rules for your elements to overwrite them. ;) – iWantSimpleLife May 15 '12 at 01:23
  • But anyway. glad you solved your problem. – iWantSimpleLife May 15 '12 at 01:24
  • Well you right... is precedence of course, but what I mean is that Im not re-writing my css with a self class declaration, but you right is precendence in a strict way. – ncubica May 18 '12 at 23:52