The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Overlong JPG displayed correctly by itself, in new tab: How?
codecruncher
post Oct 26 2023, 07:07 AM
Post #1





Group: Members
Posts: 5
Joined: 26-October 23
Member No.: 29,080






Through observing and experimenting, I made the surprising (for me at least) discovery that an overlong JPG file on my website will (upon clicking) be shown in a new tab, and in a useful size - apparently if coded with its web address, rather than its internal address.

After the click/tab opening sequence completed, you will see the entire document from top to bottom filling the page, although much too small to read it (due to its size). Once you hover the pointer over it, a tooltip opens indicating that it will be magnified once you click. And it actually does, on top in a useful size. The only 'drawback' is that you now need to vertically scroll the file, to read all of it. A tiny inconvenience, given the reward, that I will gladly put up with.

I would have expected such a function under JavaScript or something (have no knowledge of these things), but no - it seems to be pure HTML. I can't find anything on the web with the search terms used by me.

Could anyone tell me what this function is called? I would like to read a bit more about it.



User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 26 2023, 08:53 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(codecruncher @ Oct 26 2023, 02:07 PM) *

After the click/tab opening sequence completed, you will see the entire document from top to bottom filling the page, although much too small to read it (due to its size). Once you hover the pointer over it, a tooltip opens indicating that it will be magnified once you click. And it actually does, on top in a useful size.

A document, not an image? Then I'm not sure what you mean. A sample page might be helpful...

QUOTE
I would have expected such a function under JavaScript or something (have no knowledge of these things), but no - it seems to be pure HTML. I can't find anything on the web with the search terms used by me.

With IMG elements you might use CSS viewport-relative length units like "vw" and "vh" for width and height: https://www.w3.org/TR/css-values-3/#viewpor...elative-lengths

With CSS background-images you might use values like "contain" or "cover": https://developer.mozilla.org/en-US/docs/We...background-size

QUOTE
Could anyone tell me what this function is called? I would like to read a bit more about it.

I don't know what it's called, but newer browsers will indeed resize images to fit the size of the viewport when viewed directly (i.e., outside an HTML document); then you can click the image to make it appear in its normal size. It has nothing to do with HTML though, it seems to be a pure browser functionality.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
codecruncher
post Oct 26 2023, 09:49 AM
Post #3





Group: Members
Posts: 5
Joined: 26-October 23
Member No.: 29,080



Thanks! I will try to produce a screengrab and upload it, to demonstrate the effect. This may take a little while
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
codecruncher
post Oct 26 2023, 10:06 AM
Post #4





Group: Members
Posts: 5
Joined: 26-October 23
Member No.: 29,080




I'm back, it was easier than I thought (I am far from being an expert in this field).


So here's the screengrab

https://www.youtube.com/watch?v=dEmY1UwSBl4


And the source text causing this behaviour is

Und
<a href="http://j-cabal.net/bst.jpg" target="_blank">hier</a> ist ein lustiger tweet-austausch mit ihr .)


Just as a reminder: I would only need the correct term for the effect seen there (which I still wouldn't consider 'normal'), such that I can find more to read on it?

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 26 2023, 10:18 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



The video is so fuzzy and fast I cannot see what's going on. To begin with, what browser are you using?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
codecruncher
post Oct 26 2023, 10:27 AM
Post #6





Group: Members
Posts: 5
Joined: 26-October 23
Member No.: 29,080



Well - it's a screengrab, as I announced. What else did you expect?

If you go back to the TO where I described the effect in detail, then just add the clip as an illustrating confirmation - wouldn't that do the trick? Of course, I would assume a basically constructive attitude
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
codecruncher
post Oct 26 2023, 11:00 AM
Post #7





Group: Members
Posts: 5
Joined: 26-October 23
Member No.: 29,080



To Christian J

I read again what you said, and more in-depth than before. I agree, this sounds likely, I think I will try to keep going from here, while keeping an open mind .)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 26 2023, 11:44 AM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



QUOTE(codecruncher @ Oct 26 2023, 05:27 PM) *

What else did you expect?


Something useful. For example you could answer my question and tell us what browser you use in the clip. wink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 05:58 AM