|
Posted by John Hosking on 03/16/07 22:22
cwdjrxyz wrote:
> On Mar 16, 11:58 am, Neo Geshel <got...@geshel.org> wrote:
>
>>
>><object id="head" type="application/x-shockwave-flash"
>>data="/swf/header.swf" width="758" height="200">
>> <param name="allowScriptAccess" value="sameDomain" />
>> <param name="movie" value="/swf/header.swf" />
>> <param name="quality" value="high" />
>> <param name="bgcolor" value="#ffffff" />
>> <h1><a href="/">Generic Corp</a></h1>
>></object>
>>
>>Simply put, when a browser goes to print, or provides a print preview, I
>>want it to ignore the object element completely, in favour of the h1
>>element inside of the object (the object's alternative, or "graceful
>>degradation" content).
>>
>>That is, I *DO NOT* want the object element to show up on either the
>>print preview, or the actual print output at all. It should be as if the
>>object element doesn't even exist. However, I *DO* want the object's
>>"graceful degradation" content, the h1 (present for those who do not
>>have Flash installed) to show up in the print preview AND the print output.
>>
>
> I suggest that you make a second page that appears as you want it for
> printing out. Then just link to it from the main page for those who
> want to print. The print page would have your header instead of the
> flash display, and anything else that would make the printed page look
> better.
Does there have to be a completely separate page? Bend CSS to your will
(assuming it's working in your users' browsers in the first place)?
In the XHTML:
<head>
<link rel="Stylesheet" href="MyStyle.css" type="text/css" media="screen">
<link rel="Stylesheet" href="MyStylePrint.css" type="text/css"
media="print">
<object blah blah...>
<h1 class="flashthingy">Our company is dynamic</h1>
In MyStyle.css:
object#head {visibility:visible;}
h1.flashthingy {display:none;}
In MyStylePrint.css:
object#head {visibility:hidden;}
h1.flashthingy {display:block;}
Whether you use visibility or display to hide the Flash object depends
on its position and spacing relative to other elements. When I use CSS
to hide a nav menu when printing, I often use visibility:hidden so as to
preserve the layout. Sometimes, though, it's preferable to completely
/hide/ the nav menu (display:none;) to /not/ preserve the layout. You'll
have to study your design and see.
Caveat: not sure this will work for you, so try it and test it well. I
have no clue regarding <h1> or other texts in Flash objects so cannot
help you (Neo) directly.
HTH. GL.
--
John
Distressed that Thunderbird will not let me post to multiple newsgroups.
Navigation:
[Reply to this message]
|