2

I'm inheriting styles from Bootstrap and some other sources and I need to undefine one of their attributes. Is there a simple way to undefine some CSS attribute that's been imported such as:

.container, main { width: 1170; }

The question is specifically if you can "UNDEFINE" an attribute. Not overwrite it.

6ft Dan
  • 2,365
  • 1
  • 33
  • 46
  • You either manually delete it or overwrite it. Those are your options. – cimmanon Apr 14 '15 at 01:38
  • Is this what you are looking for: http://codepen.io/qbantek/pen/vGowOO ? – qbantek May 24 '16 at 14:44
  • @qbantek no that doesn't answer the question. Here's my detailed answer to my question http://6ftdan.com/allyourdev/2015/04/16/undefining-a-css-attribute-and-rant/ There is neither a CSS nor cross-browser compatible JavaScript way to undefine an attribute. – 6ft Dan May 27 '16 at 17:29

1 Answers1

0

Maybe

.container, main { width: 0px !important; }

Or am I misunderstanding the question?

EricY
  • 376
  • 1
  • 3
  • 19
  • I'm well aware of using !important to override a value. That's not what the question is. I'm asking to "undefine" a value. – 6ft Dan Apr 14 '15 at 01:36
  • I have found that in CSS the answer is "no". In jQuery you can't undefine it either but you can overwrite it. So the answer is still "no". If you'd like to overwrite 'width' with jQuery you can use the value 'auto' : `$('.container, main').css("width", "auto");` Eric I'll give you credit for an answer even though the answer is "no" for undefining it and not "maybe". – 6ft Dan Apr 14 '15 at 02:24