Jump to content

Block image display


wmckinn

Recommended Posts

I don't know if this is possible or not - can CSS be used to completely block the display of all images (or other file types) on a web page? I want to set up a stylesheet for my browser to use (Internet Explorer). In my personlized stylesheet, I'd like to keep image files from being displayed. My efforts have failed thus far. Any advice would be helpful.I was wondering if wildcards are supported in CSS - obviously I won't know the exact file names to block; only file types. I'm playing around with this in an effort to block banner ads, Flash ads, etc.Thanks!Walt

Link to comment
Share on other sites

Are you talking about actually using display:block; or wanting to a make the images not appear from the page?If you're talking about the first then the following code will block all images on your page. If you want to only select a number of images, then use classes.

<style type="text/css">img {  display: block;}</style>

If you're talking about the second, then you can do:

<style type="text/css">img {  display: none;}</style>
Link to comment
Share on other sites

Are you talking about actually using display:block; or wanting to a make the images not appear from the page?If you're talking about the first then the following code will block all images on your page. If you want to only select a number of images, then use classes.
<style type="text/css">img {  display: block;}</style>

If you're talking about the second, then you can do:

<style type="text/css">img {  display: none;}</style>
Thank you! The 'display none' code worked. Do you know of a similar way to prevent Flash files from being displayed?I have just answered my own question. I tried using 'object none' in the CSS and that effectively kills the Flash files.
Link to comment
Share on other sites

Another choice is vivibility: hidden. One ( i can't recall which) reserves space on the page and the other one doesn't.i think visibility:hidden shows an empty spot on the page.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...