/    Sign up×
Community /Pin to ProfileBookmark

Hiding images in printout using CSS

I have a slight problem. On my pages I use an image link surrounded by parentheses at the end of certain words which I define on my site.

Ex: Lorem ipsum dolor sit amet, consectetuer (<image here>) adipiscing elit. Nunc quis lectus. Aenean (<image here>) interdum, est in congue interdum, diam nulla gravida felis, in laoreet pede ipsum (<image here>) ac quam.

I need to create a class in my print.css file so that when the page is printed the parentheses and image do not show up on printout.

So my question is what is the best way to do so in the CSS file and then what is the best way to wrap those portions of the HTML document so it doesn’t affect the way it looks on the screen???

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@ray326Apr 20.2006 — <span class="prhide">(<img ...>)</span>

.prhide {display:none}
Copy linkTweet thisAlerts:
@felgallApr 20.2006 — @media print {

.prhide {display:none}

}
Copy linkTweet thisAlerts:
@mrmazurauthorApr 29.2006 — Thank you for all your help in getting my problem resolved. It now works fine.

Best Regards,

Mr.Mazur
×

Success!

Help @mrmazur spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...