This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > April 2006 > -moz-binding: none; IE equivalent?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author -moz-binding: none; IE equivalent?
VidTheKid

2006-04-02, 10:39 pm

Hello everybody. I just became the webmaster of an organization who
wants a marquee on the front page. I don't have problems using a
marquee sensibly. I actually have some structured content inside the
marquee (headings and paragraphs) and there's some CSS to set all those
things to display:inline. So, on the screen, this does exactly what I
want it to in IE and Firefox, and theoretically any browser that
doesn't support marquees should still display the content inside,
although the display:inline part could make it interesting.

Anyway, what I want to do is make the browser ignore the <marquee> tag
when the page is printed. With Firefox I could probably use
-moz-binding: none; in a stylesheet for print media, but is there a way
I can write CSS to do this for IE? I know I can simply make it all go
away (including the content) by setting display: none; but I would like
to keep the content if I can. Does anybody know a way to do this?

--
Vid the Kid

Jim Moe

2006-04-03, 10:58 pm

VidTheKid wrote:
>
> Anyway, what I want to do is make the browser ignore the <marquee> tag
> when the page is printed.
>

Add a media=print stylesheet that sets <marquee> to "display:none".

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
VidTheKid

2006-04-04, 10:52 pm

Jim Moe wrote:
> VidTheKid wrote:
> Add a media=print stylesheet that sets <marquee> to "display:none".


Did you not read my entire post? I am aware of this option as a last
resort, but I am looking for a solution that allows the content to be
printed as if it weren't inside a <marquee> element. When I said I
want the browser to ignore the <marquee> tag I did not mean it should
ignore its contents too. Do you understand me now?

--
Vid the Kid

Neredbojias

2006-04-05, 3:57 am

To further the education of mankind, "VidTheKid" <vidthekid@XXXXXXXXXX>
declaimed:

> Jim Moe wrote:
>
> Did you not read my entire post? I am aware of this option as a last
> resort, but I am looking for a solution that allows the content to be
> printed as if it weren't inside a <marquee> element. When I said I
> want the browser to ignore the <marquee> tag I did not mean it should
> ignore its contents too. Do you understand me now?


Use Jim's solution and add a <p> or something which only shows when
printed...

--
Neredbojias
Infinity can have limits.
VidTheKid

2006-04-05, 6:49 am

Neredbojias wrote:
> Use Jim's solution and add a <p> or something which only shows when
> printed...


Essentially duplicating the marquee'd content in the markup? Less than
desirable.

Logically, shouldn't <marquee>'s default printed behavior be to just
act like <div> or whatever, showing the content as if <marquee> and
</marquee> simply weren't in the code?

*sigh* I guess I have a few options in front of me. I'll have to
choose which one is the least displeasing.

--
Vid the Kid

VK

2006-04-05, 7:18 pm


VidTheKid wrote:
> Hello everybody. I just became the webmaster of an organization who
> wants a marquee on the front page. I don't have problems using a
> marquee sensibly. I actually have some structured content inside the
> marquee (headings and paragraphs) and there's some CSS to set all those
> things to display:inline. So, on the screen, this does exactly what I
> want it to in IE and Firefox, and theoretically any browser that
> doesn't support marquees should still display the content inside,
> although the display:inline part could make it interesting.
>
> Anyway, what I want to do is make the browser ignore the <marquee> tag
> when the page is printed. With Firefox I could probably use
> -moz-binding: none; in a stylesheet for print media, but is there a way
> I can write CSS to do this for IE? I know I can simply make it all go
> away (including the content) by setting display: none; but I would like
> to keep the content if I can. Does anybody know a way to do this?


First of all -moz-binding has nothing to do with marquee. -moz-binding
is Mozilla's replication of long existing IE's behaviors (google for
"internet explorer behavior").
rather
marquee is not related neither with bindings nor with behaviors: this
is an animation element implemented on the core browser level, same as
pre-historic <blink> in Netscape.

On print it is treated as regular block element (like p or div) without
need of any extra coding/styling, so the subject of your worries is
escaping me. In media:print block you may define some extra styling if
you want - say place borders around the text.

The only problem you have to solve is the overflow issue: say if the
marquee text is very long, on print it may take the whole page plus
kill the layout. I would go with overflow:hidden.

If you want to print not just marquee text, but the part of text
displayed at the moment your user pressed "Print" button, then this
problem is not solvable by CSS means. It is a rather tricky JavaScript
task.

VidTheKid

2006-04-07, 3:47 am

VK wrote:
> First of all -moz-binding has nothing to do with marquee. -moz-binding
> is Mozilla's replication of long existing IE's behaviors (google for
> "internet explorer behavior").
> rather
> marquee is not related neither with bindings nor with behaviors: this
> is an animation element implemented on the core browser level, same as
> pre-historic <blink> in Netscape.


I had read about some "tricks" that could be applied in FF's
usercontent.css: specifically, setting marquee { -moz-binding: none; }
would disable (but not remove the content of) any marquee element. I
had assumed that setting the binding to "none" could be used to turn
off any special meaning that an HTML element might posess. I tested
this just now, and it works for <marquee> but not if I make it
print-media specific, so it doesn't really help me anyway.

> On print it is treated as regular block element (like p or div) without
> need of any extra coding/styling


It should be, but it's not. In both IE6 and FF1.0, a <marquee> element
appears in print (well, print preview -- I'm not wasting paper and ink
to check presentation behavior) *exactly* as it does on-screen, except
of course without any motion. In IE, you see the first bit of content
that fits in the horizontal space, (maybe an overflow property might
help here?) and in FF it's just blank, as if the content is "about to"
scroll onto the page.

> The only problem you have to solve is the overflow issue: say if the
> marquee text is very long, on print it may take the whole page


That wouldn't bother me, if it behaved logically.

> plus
> kill the layout.


Excessive content "killing" the layout? Not in any of my designs!

I'm beginning to think that this is something the W3C really should
address. <marquee> needs to be standardized, and the standard needs to
include practical print behavior.

--
Vid the Kid

Neredbojias

2006-04-07, 3:47 am

To further the education of mankind, "VidTheKid" <vidthekid@XXXXXXXXXX>
declaimed:

> Neredbojias wrote:
>
> Essentially duplicating the marquee'd content in the markup? Less than
> desirable.
>
> Logically, shouldn't <marquee>'s default printed behavior be to just
> act like <div> or whatever, showing the content as if <marquee> and
> </marquee> simply weren't in the code?


I'm not that familiar with <marquee> but there may be a style you can add
in the css print stylesheet (which, of course, is only active during
printing,) that may render the marquee content printable. Personally, I
would try a few things (like e.g. "display:inline;" or even 'pre') just to
see what happened.

--
Neredbojias
Infinity can have limits.
VK

2006-04-07, 6:44 am


VidTheKid wrote:
> It should be, but it's not. In both IE6 and FF1.0, a <marquee> element
> appears in print (well, print preview -- I'm not wasting paper and ink
> to check presentation behavior) *exactly* as it does on-screen, except
> of course without any motion. In IE, you see the first bit of content
> that fits in the horizontal space, (maybe an overflow property might
> help here?) and in FF it's just blank, as if the content is "about to"
> scroll onto the page.


Well, sorry for IE: they must be changed the onprint behavior since IE
3.0 (and that was the last occasion I used marquee). You seem wrong
about FF though: on FF 1.5.0.1 under Windows 98 SE it behaves exactly
as IE: visible part of marquee is printed, the rest is hidden.

> I'm beginning to think that this is something the W3C really should
> address. <marquee> needs to be standardized, and the standard needs to
> include practical print behavior.


Kill me if I understand why did they include this "spirit from the
past" on the first place. <marquee> was forgotten for years and not
used anymore even by IE adepts. Somehow I understand that FF *still*
(not "now*) supports <blink>: as a sign of traditions and inheritance
from Netscape. But marquee?? There is a ocean of DHTML scrollers
written to move your text LTR, RTL, TTB, BTT and even from BRCorner to
TLCorner - and they all have no problem with printing. Just go to (just
an option) dynamicdrive.com and get what you like.

IMHO marquee specs are as much of preoccupation of W3C as say <spacer>
or <ilayer>.

kchayka

2006-04-07, 6:45 pm

VidTheKid wrote:
>
> <marquee> needs to be standardized


Some of us would rather it go away altogether. ;)

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews