Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#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:


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 dmethvin

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.

comment:2 Changed 13 years ago by dmethvin

Component: unfiledattributes

comment:3 Changed 13 years ago by dmethvin

Component: attributescss

comment:4 Changed 12 years ago by Rick Waldron

Keywords: needsreview added
Priority: majorlow
Status: newopen

comment:5 Changed 12 years ago by dmethvin

Keywords: needsreview removed
Resolution: invalid
Status: openclosed

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.