#5526 closed bug (invalid)
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.
Change History (5)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Component: | unfiled → attributes |
---|
comment:3 Changed 13 years ago by
Component: | attributes → css |
---|
comment:4 Changed 12 years ago by
Keywords: | needsreview added |
---|---|
Priority: | major → low |
Status: | new → open |
comment:5 Changed 12 years ago by
Keywords: | needsreview removed |
---|---|
Resolution: | → invalid |
Status: | open → closed |
The original reporter never provided a response. In general the shorthand properties aren't consistent across browsers.
Note: See
TracTickets for help on using
tickets.
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.