0

Hello Friends,

I have a simple problem, in my HTML page I want to display a paragraph and link but do not want to print it. Please guide me how to use CSS to achieve this.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by raj_developer
0

Hi,
it can be help you,

hi that's link
<a href="hell.html" style="color:black; filter:Glow(color=#ff0000, strength=12);">Click here!</a>
0

Hello Friends,

I have a simple problem, in my HTML page I want to display a paragraph and link but do not want to print it. Please guide me how to use CSS to achieve this.

Friends problem has been solved. Here is the solution,

Create a new external style sheet in notepad and save it as a print.css, then type in the following-

#notprint {
  display : none;
}

then save it.

Insert following in your HTML page between <HEAD></HEAD>

<LINK rel="stylesheet" type="text/css" name="style1" href="print.css" [B]media="print"[/B]>

Next step is use the following <div></div> which ever you do not want to print (image, text etc)

<div id="other" name="other"> This line will be displayed but not print </div>

Regards!!

0

Use separate styles for the same class.
For example,

@media screen
{
.sampleClassParagraph
{
display:block;
}
.sampleClassLink
{
text-decoration:underline;
}
}
@media print
{
.sampleClassParagraph
{
display:none;
}
.sampleClassLink
{
text-decoration:none;
}
}

The HTML elemnts which uses the above CSS will display the styles on screen. When printing, the styles will be removed.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.