Skip to main content

Bug Tracker

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:

IE behaves unexpectedly when you try to remove the "border" CSS style. Instead of removing the style, it sets it to "medium none".


$(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 dmethvin comment:1

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.

Changed June 13, 2010 06:37PM UTC by dmethvin comment:2

component: unfiledattributes

Changed June 15, 2010 02:05AM UTC by dmethvin comment:3

component: attributescss

Changed October 29, 2010 04:15AM UTC by rwaldron comment:4

keywords: → needsreview
priority: majorlow
status: newopen

Changed November 03, 2010 01:16AM UTC by dmethvin comment:5

keywords: needsreview
resolution: → invalid
status: openclosed

The original reporter never provided a response. In general the shorthand properties aren't consistent across browsers.