Pixel.gif why do people use it?

Just a simple question, why is pixel.gif useful? And why should you use it or why not?

+6
source share
4 answers

Pixel gifs (often called shim.gif) were used in older web projects (for example, older than, say, 5 years ago) to provide space in page or table layouts where a better understanding of reliable CSS was lacking or if the browser had differences (usually between IE and Netscape) made life difficult.

They should be considered a relic of the past and will not be viewed in the professional CSS style of modern web design. However, it is still possible that old pages that have not been supported for many years will still have page layouts based on tables with pixel art images to provide some artificial spacing for the columns.

In short, you should not use them if you need an image for collecting statistics not for javascript for your site.

+8
source

Shim.gif are transparent images, usually 1x1 pixels in size. As noted above, these images should not be used for spacing in modern web browsers (2013), since CSS does an excellent job of layout.

However, email marketing campaigns continue to use them for several reasons:

  • As an asset that can be used for marketing analytics (i.e. is email open?)
  • To resolve issues that occur due to the use of spreadsheet layouts in email.

Email clients do not universally support CSS, so it’s best to copy your newsletters and application notifications as if it were in 1996.

+3
source

Because, thanks to the story, browsers had various problems with rendering empty elements and properly setting elements. Using a transparent pixel image and stretching it as the content was a fairly universal method, allowing the element to resize correctly, and the pixel could be placed in a hyperlink, which resulted in a transparent area with clicks in any browser.

Nower-days, browsers, and browser technology have improved significantly, and I think many years have passed since I used the pixel.

+1
source

Just because of IE. IE 7-8 can not work correctly with the background png + opacity. There is only one way to fix it:

background: url("/images/blank.gif") no-repeat, url("/images/howto.png") no-repeat; background-color: transparent !important; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled="true", sizingMethod="crop", src="/images/howto.png"); zoom: 1; 

IE is not a browser. I can say nothing but bad words about this program. I now have many errors flagged by IE 7 ONLY, ONLY IE 8, IE 8 in compatibility mode with ONLY IE 7 ONLY, ONLY ONLY ONLY ONLY ONLY ONLY ONLY ONLY ONLY ONLY ONLY IE 10.

Users please! Throw windows and all his nonsense to hell. Use GNU / Linux!

0
source

Source: https://habr.com/ru/post/885492/


All Articles