Today, I developed a page for the image list. There are many. Net image controls on this page. The following is used when I use CSS to control this IMG:
Code :
. Goodslist Li a IMG {border: 1px solid # CCC; Height: 100px; width: 100px}
At this time, a strange thing happened: the browser does not display the image border.
Check the CSS code page carefully.Source codeThe IMG has one more attribute in HTML:
Style = "border-width: 0px ;"
After searching on the Internet, it is found that this is A. Net Control bug, but the solution on the internet is complicated. Then I searched for an English website and found a simple method. I can change the above CSS code:
. Goodslist Li a IMG {border: 1px solid # CCC! Important; Height: 100px; width: 100px}
It is released and displayed normally.
About! Important
! Important is protected. inserting impant ant after any attribute to be protected can avoid being overwritten by feature-based attributes. Example: # nav A {color: red;} A {color: Teal! Important}. Generally, a link in an element with an ID name # nav will change to a bit red, because # nav A is more specific than the label style, but it contains! Important thinks this attribute will always win.