Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"If it's not loud, it doesn't work!" -- Blank Reg, from "Max Headroom"


devel / comp.infosystems.www.authoring.stylesheets / Re: Responsive Image in Grid Item

SubjectAuthor
* Responsive Image in Grid ItemAndrew Poulos
`* Re: Responsive Image in Grid ItemJš•’š•žš•–š•¤ š•‚š•šš•£š•œ
 `- Re: Responsive Image in Grid ItemAndrew Poulos

1
Responsive Image in Grid Item

<f7ednbh2R45k2bX8nZ2dnUU7-KnNnZ2d@westnet.com.au>

  copy mid

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

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.westnet.com.au!news.westnet.com.au.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 26 Aug 2021 20:50:48 -0500
Newsgroups: comp.infosystems.www.authoring.stylesheets
X-Mozilla-News-Host: news://news.iinet.net.au:119
From: ap_p...@hotmail.com (Andrew Poulos)
Subject: Responsive Image in Grid Item
Date: Fri, 27 Aug 2021 11:50:47 +1000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-AU
Content-Transfer-Encoding: 7bit
Message-ID: <f7ednbh2R45k2bX8nZ2dnUU7-KnNnZ2d@westnet.com.au>
Lines: 55
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 193.116.214.235
X-Trace: sv3-oGez9cIq5gBoP6SRVAEPNQRWq33SH+lNVBVV0+i2aHAJpRtUHrEjY3cTAURmtHAckVVRjuynn+EV4cq!O4YRQLz5qttFe6YXJIT+8EQkkR0KFfyjmiQRXj+EbRJTS8wwJzMl2WbIbAaenK+sv9aU8nUlBLHx!p30ny2ENwfwyXYh+AJw14wM=
X-Complaints-To: abuse@westnet.com.au
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2251
X-Received-Bytes: 2461
 by: Andrew Poulos - Fri, 27 Aug 2021 01:50 UTC

I have this HTML

<div id="con">
<div id="tp">Text</div>

<div id="parts">
<img src="01.jpg">
</div>

<div id="bm">More text</div>
</div>

and this CSS

#con {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 20px 1fr 20px;
} #tp {
grid-column: 1;
grid-row: 1;
} #parts {
border: 1px solid #004853;
grid-column: 1;
grid-row: 2;
justify-self: center;
align-self: center;
min-width: 0;
min-height: 0;
} img {
display: block;
} #bm {
grid-column: 1;
grid-row: 3;
}

What I need is for the image to maintain its aspect ratio at all times
and also to size responsively (currently if I have a very large image
then scroll bars appear). That is, when the image's intrinsic size is
larger than the containing grid item the image shrinks to fit.

The image is an arbitrary image that a user selects.

I tried a number of approaches but none of them work.

Andrew Poulos

Re: Responsive Image in Grid Item

<4b391092-1d71103e-12280ba8.tiberius@james.kirk.invalid>

  copy mid

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

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!james.kirk.invalid!.POSTED!not-for-mail
From: noneya.i...@gmail.com (Jš•’š•žš•–š•¤ š•‚š•šš•£š•œ)
Newsgroups: comp.infosystems.www.authoring.stylesheets
Subject: Re: Responsive Image in Grid Item
Date: Sun, 29 Aug 2021 06:59:13 -0400
Organization: Time Travel Tracing
Lines: 71
Message-ID: <4b391092-1d71103e-12280ba8.tiberius@james.kirk.invalid>
References: <f7ednbh2R45k2bX8nZ2dnUU7-KnNnZ2d@westnet.com.au>
<noneya.invalid+knobknocker@gmail.com>
Reply-To: ": Jš•’š•žš•–š•¤ š•‚š•šš•£š•œ" <noneya.invalid+knobknocker@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: james.kirk.invalid; posting-host="23b019f403759523cc011d44c7372f38";
logging-data="15772"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194LdovyB1ysJE3Az27uV6QQTCwyL5Fen4="
User-Agent: Unicorn named Ellie
Cancel-Lock: sha1:p4zu/nOnULmTd4o4cVjufXeg4ZE=
X-Rot13: This message MAY contain rot13 encoded text that sensitive people
may find offense, decode at your own peril.
In-Reply-To: <f7ednbh2R45k2bX8nZ2dnUU7-KnNnZ2d@westnet.com.au>
X-Newsreader: Microsoft Windows Dead Mail Original Imitation Prototype
Content-Language: en-US
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QIHFgQpyK6L9AAAAEJQTFRFAAAAQAAAQEAAQEBAQECAgEBAgECAgIBAgICAgIC/gL+/v4BAv4CAv4C/v7+Av7+/v7//v////7+A/7+///+/////CTpitwAAAAF0Uk5TAEDm2GYAAAABYktHRBXl2PmjAAAB6klEQVRIx61Vi3KEIAz0pJZYUwIi//+r3QT78sTKTDM3N6e3y+5iIsPwT+UcdeHJOSd9Ao6kVyB2CqQkfQKpSI+AS6lDQh2VDoIzR6jYQVCBuymo7tH9EF+OUrwnAfxLFSjp/aajuZTbnujbUYop/dWz7P1kDyFWS4lYLuETyrs5VUKMSTyHthvFe/ZwFD8tRQ68SNvOxFlGh8hFl48oCoF9aOC9l23jB6n5GMHBR1gZfI7nvG2bf0hUL2YLNCWwf3Ilnip+Q2cX86+G8FM9MU/PgcmHDIaMZG6wflGKegLhyZQn4oxCBKlxTaHGBmHxz45ECRkRFFpX1+9UCQdPzHikRtBRiD8rzacEQjbFh5HKjixSzJco/kgQomyM5THvAoKFxXaLzgj40wj2FNSI2NW7pdbM/ritlbBOLu3rm0EnshOO3cHIAEZAIwG949ewvOqFX467ahIIsfJIltN2bF1XngQa/qxhWQkBEUTXzJWAGzCFKeKzaVDGpJllNwR84IlEiM/nIWRG54ERKrwSIDE3Jg57O7ooiVetYIX5o9gca2KcOzAUdnRtbEhcvMKAp/CrriTsoCKM2JenPAwzbr5dKWgYxUr+PoEvCCfq1DyBIf4iPYc8NQ5naUlQeynqJLRf9Z2E4cb58QHWYi4v2VmiigAAAABJRU5ErkJggg==
X-Operating-System: Windows 3.0
X-Content-Warning: The content of this message MAY contain controversial
topics and SHOULD NOT be viewed by: sensitive individuals, malcontents,
individuals under the age of 120, troglodytes, judgmental individuals,
opinionated individuals or multi-cellular organisms.
 by: Jš•’š•žš•–š•¤ š - Sun, 29 Aug 2021 10:59 UTC

In Message <f7ednbh2R45k2bX8nZ2dnUU7-KnNnZ2d@westnet.com.au>
On Fri, 27 Aug 2021 11:50:47 +1000
Andrew Poulos <ap_prog@hotmail.com> wrote:

> I have this HTML

> <div id="con">
> <div id="tp">Text</div>

> <div id="parts">
> <img src="01.jpg">
> </div>

> <div id="bm">More text</div>
> </div>

> and this CSS

> #con {
> position: absolute;
> left: 0;
> top: 0;
> right: 0;
> bottom: 0;
> display: grid;
> grid-template-columns: 1fr;
> grid-template-rows: 20px 1fr 20px;
> }
> #tp {
> grid-column: 1;
> grid-row: 1;
> }
> #parts {
> border: 1px solid #004853;
> grid-column: 1;
> grid-row: 2;
> justify-self: center;
> align-self: center;
> min-width: 0;
> min-height: 0;
> }
> img {
> display: block;
> }

img {
display: block;
width:auto;
height:auto;
max-height:calc(100vh - 40px);
max-width: calc(100vw - 2px);
}

> #bm {
> grid-column: 1;
> grid-row: 3;
> }

> What I need is for the image to maintain its aspect ratio at all
> times and also to size responsively (currently if I have a very large
> image then scroll bars appear). That is, when the image's intrinsic
> size is larger than the containing grid item the image shrinks to fit.

> The image is an arbitrary image that a user selects.

> I tried a number of approaches but none of them work.

--
Jš•’š•žš•–š•¤ š•‚š•šš•£š•œ

Re: Responsive Image in Grid Item

<vuqdnV2t1enNvrH8nZ2dnUU7-KfNnZ2d@westnet.com.au>

  copy mid

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

  copy link   Newsgroups: comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.westnet.com.au!news.westnet.com.au.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 29 Aug 2021 19:16:15 -0500
Subject: Re: Responsive Image in Grid Item
Newsgroups: comp.infosystems.www.authoring.stylesheets
References: <f7ednbh2R45k2bX8nZ2dnUU7-KnNnZ2d@westnet.com.au> <noneya.invalid+knobknocker@gmail.com> <4b391092-1d71103e-12280ba8.tiberius@james.kirk.invalid>
From: ap_p...@hotmail.com (Andrew Poulos)
Date: Mon, 30 Aug 2021 10:16:14 +1000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <4b391092-1d71103e-12280ba8.tiberius@james.kirk.invalid>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-AU
Content-Transfer-Encoding: 8bit
Message-ID: <vuqdnV2t1enNvrH8nZ2dnUU7-KfNnZ2d@westnet.com.au>
Lines: 66
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 193.116.214.235
X-Trace: sv3-Lkdlf3szgUR4BF8dC+cVjg4+6BaWEBgFyGuzACGifOHnxrmmFeRGYiw4FGW9XV+SsUavYDr6K7rKvfI!e+8rT0F81mwumJvdCaAblm8eJ5jmG+XenRipr+ihtKsuymqJtOOqG2YR3vXs8s2RTun5uzGFJBqg!mRD13XCrD1Vm79Q67LEeouU=
X-Complaints-To: abuse@westnet.com.au
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2638
 by: Andrew Poulos - Mon, 30 Aug 2021 00:16 UTC

On 29/08/2021 8:59 pm, Jš•’š•žš•–š•¤ š•‚š•šš•£š•œ wrote:
> In Message <f7ednbh2R45k2bX8nZ2dnUU7-KnNnZ2d@westnet.com.au>
> On Fri, 27 Aug 2021 11:50:47 +1000
> Andrew Poulos <ap_prog@hotmail.com> wrote:
>
>> I have this HTML
>
>> <div id="con">
>> <div id="tp">Text</div>
>
>> <div id="parts">
>> <img src="01.jpg">
>> </div>
>
>> <div id="bm">More text</div>
>> </div>
>
>> and this CSS
>
>> #con {
>> position: absolute;
>> left: 0;
>> top: 0;
>> right: 0;
>> bottom: 0;
>> display: grid;
>> grid-template-columns: 1fr;
>> grid-template-rows: 20px 1fr 20px;
>> }
>> #tp {
>> grid-column: 1;
>> grid-row: 1;
>> }
>> #parts {
>> border: 1px solid #004853;
>> grid-column: 1;
>> grid-row: 2;
>> justify-self: center;
>> align-self: center;
>> min-width: 0;
>> min-height: 0;
>> }
>> img {
>> display: block;
>> }
>
> img {
> display: block;
> width:auto;
> height:auto;
> max-height:calc(100vh - 40px);
> max-width: calc(100vw - 2px);
> }
>

That did it! Thanks.

I gave up and was trying to get it to work using flex now I can go back
to the original approach.

Andrew Poulos

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor