Advertisements

Archive

Posts Tagged ‘ie’

How to remove x from Internet Explorer ?


How to remove X from IE input box, Here is the css we can write to remove x.

/* clears the ‘X’ from Internet Explorer */
input[type=search]::-ms-clear { display: none; width : 0; height: 0; }
input[type=search]::-ms-reveal { display: none; width : 0; height: 0; }

Or

/* clears the ‘X’ from Chrome */


input[type=”search”]::-webkit-search-decoration,
input[type=”search”]::-webkit-search-cancel-button,
input[type=”search”]::-webkit-search-results-button,
input[type=”search”]::-webkit-search-results-decoration { display: none; }

Thanks

Advertisements
Categories: ASP.NET Tags: , ,

hide img tag if src is empty but without javascript/jQuery or css3


You can use [attr=val] selector

 img[src=“”]{display: none;}

The above selector will simply match, if the src attribute has no value.

Alternatively, if you want to reserve the space taken by img tag, you might like to use 
visibility: hidden; instead of display: none; 
as display: none; will simply mess your layout 
where visibility: hidden; will reserve the space, it will just hide the img.

Enjoy Demo:

Demo

 
Hope this help !
Categories: ASP.NET Tags: , , ,