On my ASP.NET 4 / VB website, I encountered a scenario where I needed to incorporate a class called "noprint" in my footer, as specified in the print.css file. However, there was already a span class present, so I ended up enclosing div tags around it. Moreover, all my tr's and td's had classes assigned to them.
Essentially, this is what my footer looked like:
Knowledge Base | Contact USS | Copyright © USS Vision Inc. 2012 | 888-888-8888
The only element I wished to be printed out was the phone number.
I utilized
<div class="noprint">whatever I want omitted when printing</div>
This method worked fine for me. However, I faced an issue when viewing the webpage – I did not want the 888-888-8888
to display below everything else, hence ruling out the use of div tags. The noprint class served its purpose but was there a way to integrate it into my footer without causing the phone number to appear below the rest of the content due to the div tags? Any assistance or suggestions would be greatly appreciated!
Update: The contents of my print.css stylesheet were as follows:
@media screen
{
/* styles for display */
}
@media print
{
.noprint { display: none; }
}
Now, I am unsure how to set the div tags to have display: inline
. Nevertheless, I plan to conduct further research and explore potential solutions!