Side navigation
#5526 closed bug (invalid)
Opened November 17, 2009 11:49PM UTC
Closed November 03, 2010 01:16AM UTC
Last modified March 15, 2012 11:47AM UTC
can't remove "border" element style in IE
Reported by: | damian.biollo | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.4 |
Component: | css | Version: | 1.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
IE behaves unexpectedly when you try to remove the "border" CSS style. Instead of removing the style, it sets it to "medium none".
Ex.
$(this).css("border", "");
doesn't work.
Apparently, though, you can make it work with this code:
if ($.browser.msie) {
$(this).css("borderColor", "");
$(this).css("borderWidth", "");
$(this).css("borderStyle", "");
}
It would be great if you could make jQuery implement this patch, so it behaves the same in IE as in FF, etc.
Attachments (0)
Change History (5)
Changed November 18, 2009 01:48AM UTC by comment:1
Changed June 13, 2010 06:37PM UTC by comment:2
component: | unfiled → attributes |
---|
Changed June 15, 2010 02:05AM UTC by comment:3
component: | attributes → css |
---|
Changed October 29, 2010 04:15AM UTC by comment:4
keywords: | → needsreview |
---|---|
priority: | major → low |
status: | new → open |
Changed November 03, 2010 01:16AM UTC by comment:5
keywords: | needsreview |
---|---|
resolution: | → invalid |
status: | open → closed |
The original reporter never provided a response. In general the shorthand properties aren't consistent across browsers.
Properties like "border" and "margin" are combinations of several different individual properties; generally it's better to use the individual ones. What were you trying to do with the information you got from "border" that tripped you up? Remember that each of an element's 4 sides can have a different border color, style, and width.