Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help with visibility for projection media (OperaShow)

0 views
Skip to first unread message

Timothy Larson

unread,
Feb 12, 2009, 12:37:48 AM2/12/09
to
Hello!

I want to create a document to be used in a presentation. I thought this
would be as simple as setting up a few rules in an @media projection block.
My basic idea is to make an outline from the H# tags and suppress everything else.

* { display:none; } /* Turn off everything! Then turn on only elements we want
to see. */
h1,h2 { display:block; }
h2 { page-break-before:always; }
h3,h4,h5,h6 { display:list-item; }

Unfortunately, in projection mode nothing shows up. I thought the specificity
of any explicit tag would be more than *, and even if not, they should take
precedence since they come later. I've reviewed the spec and am pretty sure I
am right. What am I doing wrong? Or is Opera 9.5 wrong?


Thanks,
Tim

Timothy Larson

unread,
Feb 12, 2009, 12:57:09 AM2/12/09
to
Hello!

I want to create a document to be used in a presentation, but will full notes
included for review later. I thought this would be as simple as setting up a

dorayme

unread,
Feb 12, 2009, 1:51:07 AM2/12/09
to
In article <VSOkl.25773$Dx3....@newsfe21.iad>,
Timothy Larson <thela...@cox.net> wrote:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>some elements visible</title>
<style type="text/css" media="screen">
* { visibility: hidden; } /* Turn off everything! Then turn on only

elements we want to see. */

h1, h2, h5 {visibility: visible; }
</style>
</head>
<body>
<h1>H1</h1>
<h2>H2</h2>
<h3>H3</h3>
<h4>H4</h4>
<h5>H5</h5>
</body>
</html>

Should make just h1, h2 and h5 visible. Is this what you want?

--
dorayme

Ben C

unread,
Feb 12, 2009, 3:48:37 AM2/12/09
to

The problem is the BODY element and the HTML element, and anything else
that may be outside your headings, are still display: none.

If something's display: none it takes all its children with it,
regardless of what value they have for display. This is usually what you
want-- otherwise to make something disappear you'd have to recursively
change display on all its children.

You can use visibility here though. Set BODY or HTML to visibility:
hidden. All its descendents will inherit that in the CSS sense, but it
can be overridden.

So h1 { visibility: visible } will make the headings re-appear out of
the ether.

Ben C

unread,
Feb 12, 2009, 3:51:56 AM2/12/09
to
On 2009-02-12, dorayme <dorayme...@optusnet.com.au> wrote:
[...]

> * { visibility: hidden; } /* Turn off everything! Then turn on only
> elements we want to see. */
> h1, h2, h5 {visibility: visible; }

Rather than *, use html { visibility: hidden }. That way you can do
this:

<html>
...
<div>
<ul>
<li>foo</li>
</ul>
</div>
...

To start with the li is hidden, because it inherits that from html.

If I set the div to visibility: visible, now the ul and li will inherit
that, so the whole lot will pop up. Probably what one wants.

But if you set * { visibility: hidden } then you will need to set the ul
and li to visibility: visible (or visibility: inherit) manually.

Harlan Messinger

unread,
Feb 12, 2009, 10:45:35 AM2/12/09
to

The problem with visibility: hidden is that the invisible elements
continue to occupy the same space they would have occupied if they were
visible.

Timothy Larson

unread,
Feb 13, 2009, 1:04:10 AM2/13/09
to
Ben C wrote:
> The problem is the BODY element and the HTML element, and anything else
> that may be outside your headings, are still display: none.

Doh! You are absolutely correct. I set HTML and BODY to display:block, and
now things are beginning to work as I thought they should. Thanks!


Tim

0 new messages