Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

We'll pivot at warp 2 and bring all tubes to bear, Mr. Sulu!


devel / comp.infosystems.www.authoring.stylesheets / Re: make image as big as possible

SubjectAuthor
* make image as big as possibleHelmut Richter
`* Re: make image as big as possibleJohn-Paul Stewart
 `- Re: make image as big as possibleHelmut Richter

1
make image as big as possible

<alpine.DEB.2.22.394.2205282109530.2172@kiboko2>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=270&group=comp.infosystems.www.authoring.stylesheets#270

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: hr.use...@email.de (Helmut Richter)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: make image as big as possible
Date: Sat, 28 May 2022 21:24:59 +0200
Lines: 25
Message-ID: <alpine.DEB.2.22.394.2205282109530.2172@kiboko2>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8BIT
X-Trace: individual.net CG8SqEY1OAqHQU8G7RoTWQe8hHz1PsKArjY9i+KMTY/lz42jvy
X-Orig-Path: kiboko2!helmut
Cancel-Lock: sha1:loylNidLoGBU6KXuapFh2xfg+PQ=
X-X-Sender: helmut@kiboko2
User-Agent: Alpine 2.22 (DEB 394 2020-01-19)
 by: Helmut Richter - Sat, 28 May 2022 19:24 UTC

I want to place an <img> into a <div>-box with a certain width and want it
as big as possible so that it fits into the box. The obvious syntax
<img src="..." width="100%"> works fine with Firefox but the syntax is not
correct: width can only specified as number of pixels. But I do not know
the width of the box in pixels – it depends on the size of the viewport
and on the font size chosen by the user.

Is there a way to get this effect without a syntax problem?

The thing that worked (with wrong syntax) was:

<div style="max-width:48em; border:red solid 1px"> <!-- same width as text -->
<div style="float:right; width:60%; border:green solid 1px"><img
src="641003%20GZB-051g%20GZB.tif.jpg" width="100%"/></div> <!-- box for img -->
</div>

Probably there are other solutions that are easier but I do not see them.

I need it for getting at least bit responsiveness to varying screen sizes.
A work-around would be with "srcset" and "sizes" attributes but this is
far more complicated.

--
Helmut Richter

Re: make image as big as possible

<jffd3oF2m2jU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=271&group=comp.infosystems.www.authoring.stylesheets#271

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: jpstew...@personalprojects.net (John-Paul Stewart)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: make image as big as possible
Date: Sat, 28 May 2022 15:56:36 -0400
Lines: 10
Message-ID: <jffd3oF2m2jU1@mid.individual.net>
References: <alpine.DEB.2.22.394.2205282109530.2172@kiboko2>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 7ygc9RUVy3khM++ZT3mI7ww88l6LhtRJuphUAUnpNLv5ZySmUP
Cancel-Lock: sha1:MgInl4uiG6KdZ4AJkh5Kl/ALkic=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.0
Content-Language: en-CA
In-Reply-To: <alpine.DEB.2.22.394.2205282109530.2172@kiboko2>
 by: John-Paul Stewart - Sat, 28 May 2022 19:56 UTC

On 2022-05-28 15:24, Helmut Richter wrote:
> I want to place an <img> into a <div>-box with a certain width and want it
> as big as possible so that it fits into the box. The obvious syntax
> <img src="..." width="100%"> works fine with Firefox but the syntax is not
> correct: width can only specified as number of pixels.

Use CSS, where 100% is syntactically valid for width:

<img src="..." style="width: 100%;">

Re: make image as big as possible

<alpine.DEB.2.22.394.2205290022230.2172@kiboko2>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=272&group=comp.infosystems.www.authoring.stylesheets#272

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: hr.use...@email.de (Helmut Richter)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: make image as big as possible
Date: Sun, 29 May 2022 00:25:30 +0200
Lines: 20
Message-ID: <alpine.DEB.2.22.394.2205290022230.2172@kiboko2>
References: <alpine.DEB.2.22.394.2205282109530.2172@kiboko2> <jffd3oF2m2jU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
X-Trace: individual.net ZOHGm2IZLbQyPlHiEMIfqAXQSx4JkVkcLK7OYMpbujo1JuKoaH
X-Orig-Path: kiboko2!helmut
Cancel-Lock: sha1:s89j8hLscpvPVn8YgEIPJ4nbklw=
X-X-Sender: helmut@kiboko2
In-Reply-To: <jffd3oF2m2jU1@mid.individual.net>
User-Agent: Alpine 2.22 (DEB 394 2020-01-19)
 by: Helmut Richter - Sat, 28 May 2022 22:25 UTC

On Sat, 28 May 2022, John-Paul Stewart wrote:

> On 2022-05-28 15:24, Helmut Richter wrote:
> > I want to place an <img> into a <div>-box with a certain width and want it
> > as big as possible so that it fits into the box. The obvious syntax
> > <img src="..." width="100%"> works fine with Firefox but the syntax is not
> > correct: width can only specified as number of pixels.
>
> Use CSS, where 100% is syntactically valid for width:
>
> <img src="..." style="width: 100%;">

Yes indeed, sometimes I do not see the forest for the trees.

Thank you. You may have saved me hours of trials with increasing
complexity.

--
Helmut Richter

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor