transparent color - background image.

M

Mr. X.

Hello.

In a html document, that use some internal frames (iframe, frames)
How can I make from the main page (that includes all to frame) to have a
background-image, and that all subframes will not cover that background with
some color
(their color is trasparent) ?
(I meant : Is there was something in CSS :
bgcolor: ... transparency-color ?).

Thanks :)
 
D

dorayme

"Mr. X. said:
Hello.

In a html document, that use some internal frames (iframe, frames)
How can I make from the main page (that includes all to frame) to have a
background-image, and that all subframes will not cover that background with
some color
(their color is trasparent) ?
(I meant : Is there was something in CSS :
bgcolor: ... transparency-color ?).

Thanks :)

As far as I am aware, a frameset (your "main page"?) is just a
structural artifact that holds the frames themselves. In other words, it
does not have much of a life of its own, it is like a mother who lives
for her children and not much else. All instructions to it are about how
to lay out the frames, it is all about the selfish frames.

And the frames themselves have their own canvases which cannot be
transparent as I understand it.

The canvas is a sort of transcendental object higher/more basic than the
html root. Some theologian types think they can be transparent but in my
opinion they are simply confusing "transcendental" with "transparent".
These things are quite different. Theologians often make these idiotic
blunders even as they speak with great seriousness in highly educated
voices in the wake of very expensive and extensive education.

So no, you might have to settle for giving specific backgrounds to the
frames themselves and if you want some continuity, you will have to
design that in carefully. If you say about what you want more
specifically, perhaps I can give you some more tips.

In the meantime, if you want to read an early draft to a book I am
writing, The Selfish Frame, please ask.
 
M

Mr. X.

What I meant.

I have a one background (may be image, color, etc).
and all of the frames, or iframes getting by default the same background
image / color
of their parent.

I need a sample (if the above is resolveable), please.

Thanks :)
 
D

dorayme

Ben C said:
Canvases can be transparent-- just set background-color: transparent on
the root element.


I know little about iframes, when I left frames I avoided even looking
at iframes, so in my remarks to the OP I was suggesting things in the
context of frames and framesets. I stand by my advice, for now, in
regard to real frames, namely to not try to rely on any background to a
frameset but to work with just the frames themselves.

The HTML element can be given a background colour or image in a
frameset. This had simply never occurred to me when making framed sites
and you have made me realise it is possible. But it is pretty unreliable
judging on my tests tonight. The frames themselves will not *reliably*
go transparent in my Safari or iCab, although they do in FF. At least
not via CSS in the head.

On to another matter though, less practical and more fascinating to me:

I am mightily perplexed by some of your statements but I know you
probably mean things that have some practical sense. For now I willjust
say:

If it makes sense for something, y, to be behind x, then it can (though
not necessarily) make sense for x to be transparent.

There has to be the turtle somewhere in this matter at least. You say
things that suggest the HTML and Canvas can be transparent and I get
mightily perplexed!

What ultimately is to be seen if so much is transparent? You never see
the bright bulb at the back of an LCD screen or the dust that gathers
behind a screen on a desk or God or Roger Rabbit through a viewport.

What you see is some plain colour or an image you have set. It is the
colour of Canvas and Canvas is either handed the colour by the browser
as a gift or it pinches it as we have discussed before from the HTML.
There has to be something whose very essence is non-tranparency. As
different to the nature of glass as possible!

I mean, a painter could paint on glass. Some do. And for various
reasons, the only one that will concern us at the moment is them doing
so *because* it is transparent. And that might be because the painter
can see through it to trace something in the background. But what is
usefully behind a root element or a canvas? At some stage you earthlings
have to come clean about all this stuff and face that ultimate turtle,
and it ain't no piece of clear glass.

Time for a movie. I have only just warmed up from a swim earlier, it is
bloody freezing in the water in Sydney. <g>
 
D

dorayme

Yes, there is something behind the canvas (by default the canvas is
transparent).

In most browsers it is white but people like Bergamot set it to a
bilious green to make it easier to see the error of relying on a white
background but not setting it on the canvas.

Perhaps Bergamot would set an aural browser's Ultimate Background to the
music you hear in lifts in department stores, you know, rather than the
default Silence.
What to call that thing behind the canvas? Well I think it makes sense
to call it the viewport for the following reason.

If you look into a div that is overflow: scroll you see the div's
contents and behind them, where they are transparent, the div's own
background.

When you scroll the div, you move its children around relative to its
top-left corner, and its background stays where it is. Its children's
children are positioned relative to its children, and so on down, so
they all move too.

The viewport is just the same, except that it only has one child-- the
canvas. When you scroll the viewport you move its child around. All the
other elements are on top of the canvas, so they move with it.

This is how it is possible to have the root element's background image
move with its contents when you scroll (and is why the idea of a
"canvas" was invented in the first place).

I hear your argument. I snip a lot of it to avoid the charge of a lack
of comprehensive reading. And I snip most of my reply because I really
ought to think more about it. Like a famous general, I will return. I
accept that a lot of canvases about the place are transparent.

I need to know how to set my browsers' default background colours
because I want to see this for myself. I am investigating. Trust me.
Just one more time.
 
D

dorayme

Ben C said:
You can do it in Firefox as well as Opera.

Edit->Preferences->Content->Fonts & Colours.

Then click on Colours, tell it not to use system colours, and choose a
colour for background.

Last thing I did yesterday was set a background in my FF. I did it via
about: config into the url bar.

Basically what is happening here in Sydney, I have been trying to get it
on to the BBC news service, is a parallel experiment to the current CERN
project. There, they are smashing protons into each other to see what
happens and they will then look at how to account for it all.

Here, in Newtown, Sydney, I am Director of Research into the mysterious
Ultimate Opaque Object that forms the background to all webpages. I am
experimenting with turning on and off various lines in such as:

<http://dorayme.890m.com/alt/scrollingDiv.html>

eg.

<http://dorayme.890m.com/alt/scrollingDivTransparent.html>

which looks like this on my FF now that I have configured what the
browser claims is "background" to a creamy yellow:

<http://dorayme.890m.com/alt/justPics/uoos.png>

And the whole picture is greatly complicated by the thieving behaviour
of Canvas and HTML which I have mentioned before. It is a big nuisance
(for research purposes) that one cannot give a colour to HTML and have
it but *not* the area outside it so coloured. If HTML were given an
orange background, the colour is not confined to what is inside the red
dotted limits of HTML in the above URL.

What Bergamot does not care about, you see, in setting his colour to
billious green is that you have to see it in the early morning no matter
how you have lived the night before when you open your browser with no
webpage. Creamy yellow is enough to grab my attention thank you very
much.

I suspect that you would claim that what you see in a blank window that
has no web page is the viewport, or if I pressed you, the backing to the
viewport. Backing, because a viewport can hardly be other than
transparent at the front to be useful. I have conceded previously it
could be tinted. And if really pressed, I would concede it *could*
usefully be opaque in limited circumstances, for example where a parent
could configure it for a naughty child"

<http://dorayme.890m.com/alt/justPics/opaqueviewport.png>

That is the window part, the front of it.

As for whether the ultimate opaque object is the back of the viewport,
the browser itself, or the HTML root itself, I have not completely made
up my mind. I know you have arguments to show it could not be HTML
because HTML can be given "transparent" and that Canvas can be
transparent and is by default. But it is not clear to me, with all the
skullduggery going on of backgrounds being pinched left right and centre
between Body, HTML and Canvas, that things might not be as they seem.

Perhaps there is an extra Rectangle after all. Remember Ben, Ockham was
no barrier to the initial belief in Neptune. It might turn out that
Rectangle, that is not the viewport's backing nor the browser's nor a
website layer has to be implicated.

It may be that HTML itself (a theory I am a little drawn to myself) is
more complex in its nature than we all think. It may have transparent
parts and non-transparent parts. After all, it is not exactly such a
lucid object to the ordinary understanding.
 
D

dorayme

Ben C said:
Another thing that's confusing is that you can't set opacity on the
canvas-- if you set opacity it just goes on the real BODY or HTML,
because it's not a special "thieved" property.

But many browsers, including Firefox 3, support CSS3 semi-transparent
colours, which can be set on the canvas, just like any other colour
e.g.:

body { background-color: rgba(255, 0, 0, 0.5) }

If you do that the colour you see should be a blend of the
browser.display.background_color you configured and red, confirming that
the canvas is on top of the viewport background.

OK, I will add this to the experimental schedule. Interesting. I am not
a big fan of "confirmation" though, and I will reserve judgement on
whether this lends credibility to the idea of the viewport having its
own background. I concede it lends credibility to that Canvas is not the
ultimate background, one of your main contentions.

(Big subject, "confirmation" in science, but briefly: confirmation is
ten a penny for almost anything, true or false. There are better tests
of truth...)

As a result of this thread, I have now become a fan of making at least
one of my browser's background other than white because it is a nice
quick check on authors' coding, including mine. I will not do this in
Safari because I actually use this browser to look stuff up unrelated to
web design. And it is better to avoid seeing all the little faults (like
white elements that are clearly meant to be seen with white all around
it...)

A tiny little bit of important data fell into my hands this morning,
and it is not good news for your Viewport Sandwich Theory of Ultimate
Background. (The idea that the viewport has a transparent front to look
through and an opaque back that is default white or set to some other
colour). I won't speculate too much now but it is favourable to the
Theory of an Extra Rectangle (or at least Object) that somehow hangs
about the browser broadly conceived.

OK, this is the datum: I was looking at a website in FF, one of my own
as it happened, which had a white background explicitly set at a high
level, and I went to View Source to check something. As the source
window flew open, it was filled with the yellow colour I had previously
set, just for a very brief fraction of a second.

I am not sure an earthling would see it, but I did. I am not kidding
you, it was there and I saw it! In other words, it seems that the
Ultimate Background was there and clearly not in Viewport but behind
Source. Source, of course, had its own white background, as have many
text docs, but it was delayed in appearing in the Source window.

Now there are a lot of theories of what could account for this, but I
fancy it is suggestive of the one and same object appearing to back both
webpages through Viewport and markup through Source.

Here is what a high tech HTML camera sees, it is a repeatable
phenomenon, and I slow the film down for you earthlings:

I don't remember if Bergamot actually uses bilious green-- it may have
been liverish pink, and it might not have been Bergamot.

I know it was not Roger Rabbit. I've talked to RR and he has a very
delicate sense of taste in these matters, don't be fooled by that he
does not mind some pretty honky colours in Jessica Rabbit's dresses. But
he can be forgiven for that. I swear to God, as I sit here typing, I
could take almost any colour in Jessica's dresses in my stride.
 
D

dorayme

Ben C said:
Yes, although the viewport doesn't have to have a front at all.

If it did not have a front, you would not be able to see anything
against its background. You could not look from the sides, and only a
cat would be silly enough to try to look from the back.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top