467,225 Members | 1,397 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,225 developers. It's quick & easy.

CSS Printing different than aspx page

In my web application, I am using two different CSS based on media. In my
Print CSS, I can suppress button, header and ad objects using "Display:
None;". However, I need to print an object that does not actually display on
the ASPX page. In my Screen CSS, I tried to use "Display: None" for that
object (by ID). It will not print based on my various attempts to print that
object (by ID) in my Print CSS.

I would appreciate suggestions on how I can print an object but not display
that object on my ASPX page. I prefer to use CSS if possible.

Thanks!
Jun 5 '07 #1
  • viewed: 2292
Share:
1 Reply
Lynda,

Here is a sample of how to do this with CSS. For my purposes, this
displayed a DropDownList to the user of the site, but hid it and displayed a
text label upon printing.

..accountListDropdown
{
text-transform: capitalize;
font-size: 0.9em;
}

..accountListLabel
{
display: none;
visibility: hidden;
}

@media print
{
.accountListDropdown
{
display: none;
visibility: hidden;
}

.accountListLabel
{
display: inline;
visibility: visible;
text-align: left;
}
}

Hope this helps,
Steve
"Lynda" <Ly***@discussions.microsoft.comwrote in message
news:92**********************************@microsof t.com...
In my web application, I am using two different CSS based on media. In my
Print CSS, I can suppress button, header and ad objects using "Display:
None;". However, I need to print an object that does not actually display
on
the ASPX page. In my Screen CSS, I tried to use "Display: None" for that
object (by ID). It will not print based on my various attempts to print
that
object (by ID) in my Print CSS.

I would appreciate suggestions on how I can print an object but not
display
that object on my ASPX page. I prefer to use CSS if possible.

Thanks!

Jun 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Niyazi | last post: by
1 post views Thread by Smitha Nataraj | last post: by
2 posts views Thread by Sukh | last post: by
4 posts views Thread by Lucas Ponzo | last post: by
18 posts views Thread by Brett | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.