height="100%"

C

Chase Preuninger

If I were to create an image <img src="..." width="100%" height="100%"/
the with would span the entire width of its container but the height
does not span the entire height. Why, and how can I change this?
 
B

BootNic

On Thu, 26 Jun 2008 11:07:44 -0700 (PDT)
If I were to create an image <img src="..." width="100%" height="100%"/
does not span the entire height. Why, and how can I change this?

100% of what?

http://tinyurl.com/49h54l




--
BootNic Thr Jun 26, 2008 2:50 PM
The world is very different now. For man holds in his mortal hands
the power to abolish all forms of human poverty, and all forms of
human life.
*John Fitzgerald Kennedy, Inaugural Address*


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkhj5RIACgkQylMUzZO6jeLOQwCdEeZ5kVcJ0xg3/B+KiJhSLlmQ
vA8AnidbAEMPdEWfcPWPKTVoARiXI2YR
=RFoM
-----END PGP SIGNATURE-----
 
B

BootNic

On Thu, 26 Jun 2008 17:19:34 -0400
<[email protected]>

[snip]
Newsgroups are not bulletin boards. Do not include the BBS coding
please. My newsreader thinks there is an attachment.

Do you not trust your news reader?

Do you think that it shows my message as having an attachment because
of the way I choose to mark up a url?

I suppose anything is possible. However if I were you, I would trust
the news reader, as it may know best.


--
BootNic Thr Jun 26, 2008 5:50 PM
Freedom defined is freedom denied.
*Illuminatus*


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkhkDz8ACgkQylMUzZO6jeIiCgCbBijc7mtau3d8SlQ+gp0gL1+j
84gAn1OxyE4vUeITU7r/irpEf1auYyjO
=8hIA
-----END PGP SIGNATURE-----
 
B

Beauregard T. Shagnasty

richard said:
hah! your service is having hiccups. You just posted the same message
3 times. so there.

Yep. Seems motzarella is having a problem. I only sent it once.
is not valid html coding.


"html coding?" No, it's just text, in these text posts.
I've only seen it used on BBS.

...and various places in Usenet.[/QUOTE]
 
R

richard

On Thu, 26 Jun 2008 17:19:34 -0400
<[email protected]>

[snip]
Newsgroups are not bulletin boards. Do not include the BBS coding
please. My newsreader thinks there is an attachment.

Do you not trust your news reader?

Do you think that it shows my message as having an attachment because
of the way I choose to mark up a url?

I suppose anything is possible. However if I were you, I would trust
the news reader, as it may know best.

From your headers:
Content-Type: multipart/signed;
boundary="Sig_/GyTeaOYRZgF8SJeZB62uwH6";
protocol="application/pgp-signature"; micalg=PGP-SHA1

This is a binary attachment. Your x-face is fine.
pgp signatures should be sent as ascii text.
 
C

Chase Preuninger

Well I want to display my item from the top of the screen stretched to
the bottom of the visible screen.
 
D

dorayme

Ben C said:
You need to make sure the container doesn't have auto height.
Percentages of auto are ignored because auto height for most things
means "the height of the contents"-- so it is circular to require the
contents' height to be some percentage of the container's.

One of the things you have to watch out for is how different browsers
assume things about the html element in relation to the viewport.

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

In FF and Opera and MacIE5, but not iCab, Safari 2, the HTML element is
governed by the content of the body, the body is governed by the content
of the div. In Safari and iCab the HTML element steals the body's height
instruction (just as it does with backgrounds on body in some cases) and
changes its meaning to relate to the viewport or something more
mysterious. Hence the ease with which it stretches the content div.

Basically the HTML element is not a wholly honest citizen of the HTML
world, no wonder so many of us have viewed it with some suspicion.

If one adds height: 100% to the viewport, it is then required to be 100%
of its containing block (meaning whatever the browser decides this is.
How this for a bit of postmodernistic buck passing). This then brings
all the 4 browsers i mention into line. No idea what IE7 is doing. I can
check IE6 but have not lately.

Frankly, I would like to see viewport {...} as an element. it would be
honest and up front and ,ake us more comfortable knowing where we stood.
We all know what a viewport is. I think we all know.
 
D

dorayme

Neredbojias said:
Nice job on the html, but you _could_ have picked a pic which wasn't
_completely_ uniform... Do martians have conceptual difficulties?

Nag, nag, nag.

Your question, young man, is presumably, Why did you pick a pic of a bit
of uniform colour when i could have picked a pic that either distorted
horribly or did not and it proving some interesting point about that
picture?

Because I use crimson.png for a lot of things in tests; in other words,
it is handy and I always remember it and it is always in a folder called
pics on my desktop and various servers. So i don't ned to do anything
but write up the html and css.

And besides, because I am not prepared this morning to use a picture
that distorts when stretched in case it upsets the delicate state of my
brain.
 
D

dorayme

Ben C said:
Yes, although to clarify that, you aren't setting height: 100% on the
viewport,

No, of course, one cannot do this. As in the CSS in above URL, the
height is on the body element. It is 100% of the HTML (its containing
block).
but height: 100% on HTML, which is a child of the viewport.

It is not strictly a child (viewport not being an element). Though this
is something that would be nice and clear - ie. if viewport was an
element. I am hazy on the implications of all this, whether it is just
some semantic advantage if we did accord viewport element status or
whether there would be real practical gains for website makers to more
easily understand things.

A viewport is about as simple to understand as one's navel, there is
nothing much in it. But an HTML element as root, with some remarks in
the CSS 2.1 specs about *its* containing block...
Since the viewport has an established height (set by the user with their
mouse etc.) 100% works-- there's something clear for it to be 100% of.

BODY can then be 100% of HTML and so on down the document tree.

[...]
Frankly, I would like to see viewport {...} as an element. it would be
honest and up front and ,ake us more comfortable knowing where we stood.
We all know what a viewport is. I think we all know.

That might be better. Also canvas { ... }.

Then you'd just restrict what worked on what. At the moment you can set
overflow on the viewport, background on the canvas, and width and height
on the HTML element (the root element). That behaviour's about right but
you actually set those things all on BODY (or HTML) and they get stolen
by other things in complicated ways.

Complicated ways, yes. Which is why you have not seen my deep studies
into root theory yet. I might have time to progress them after the next
job. I know, promises, promises... <g>
 
D

dorayme

Neredbojias said:
...and a pic that might have possibly displayed to the OP that your
solution actually worked.

You mean OP might be so stupid as to have missed the significance of my
words: "Here is an image which has a natural size of only 137 x 41px"?
What a rude thought Boji! Have some respect for your fellow earthlings
even if you show disrespect to ETs.
Oh, what a pitiful excuse. I didn't realize you had _so_ much trouble
negotiating the file storage hierarchy on your own computer.

I don't need to negotiate anything the way I did it. You negotiate if
you want. Listen, talking about negotiations, I am reminded:

* No money has arrived from you as yet

* Your head has not come as promised
 
D

dorayme

Ben C said:
You're right not strictly a child in that sense.

But the viewport does define the "initial containing block".

The DOM tree is defined by the HTML document (and may be modified by
scripting). It has parent nodes, children, etc.

CSS defines another tree, of containing blocks. A containing block can
contain more containing blocks, tables, floats, or inlines. Table cells,
floats and inline blocks can contain more containing blocks. And so on.
The stucture is a tree.

The root of _that_ tree is the containing block defined by the viewport.

Mostly the two trees are fairly similar, but the "CSS tree", besides
having the initial containing block as a root, also has anonymous
blocks, anonymous table boxes, and boxes for generated content
:)before/:after) in it.

Yes, a nice description. I am aware that the HTML can have as a
containing block, a viewport. But from the last time I looked at the 2.1
CSS specs, it does not quite say as much. Or at least it seems coy about
it. I could not understand why it would say things like:

"The containing block in which the root element lives is a rectangle
with the dimensions of the viewport"

when it could say

"The containing block for the HTML element is the viewport"

I had thought that maybe there was some subtlety I was missing and that
it was leaving it open to browsers for some reason? I realised that a
future browser was unlikely to make Roger Rabbit the containing block
(though of course, one can never be sure with Internet Explorer), but
the point is there might be a reason for the specs being a little coy
about this. I have some theories but they are a little vague.

On re-reading the specs I guess it is simplest to just view the viewport
as it.
 
D

dorayme

Neredbojias said:
He probably thought that you screwed up, which is what I thought when I
first perused your inappropriate offering. Of course, you _did_ screw
up, but in a way not related to the html.

I deny I screwed up because I deny that my offering was meant for a
complete turkey. Ever heard of respect for others' intelligence? Ever
heard of not caring if a message is not getting though to someone who
cares not to think past his nose?

I reserve disrespect and contempt for a chosen few. Do you feel lucky?
Well, do you, punk?
Well, yes, I try to do things right when I do them.

You pretentious schmuck!
Ever hear the old
(Earth) expression "If something is worth doing, it's worth doing well"?
Using a blank image because it's handy on the desktop or wherever is
_not_ what I would call doing things well.

It was not blank, Mr Turkey, it was not blank. Blank, Mr Turkey, would
have been a mistake. Can you see why? Obviously not. Let me help you: a
137 x 41px blank gif in the middle of a viewport that is 1200 x 1600px
would, beyond reasonable doubt, look exactly like no gif through a 1200
x 1600 viewport. Whereas the difference between a 137 x 41px crimson
through a 1200 x 1600px viewport and a 1200 x 1600px is very great
indeed. Why don't you, as an exercise, calculate the percentage
difference in appearance.

If you really want to see a nice image stretch, not that long ago, on a
related issue to this thread, I *did* use a pic of my own (of clouds).
Look it up. Buggered if I know where it is on usenet.

Anyway, I know what you would like and I will make it just for you. Wait
a minute, dear Boji...

Here is a pic I took in my own street, Australian clouds:

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

Why don't you make one of these, use a face and make it go like those
funny mirrors in fun parks.
 

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,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top