Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2023-12-12 18:40:56

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Dimensionless img via height="0" width="0" works no more?

Glad it helps and nothing to apologize for, but your showcase section is distorted (now?). Probably because you have two height:auto declarations in screen.css

img {
	max-width: 100%;
	height: auto;
	height: auto;
}

instead of

img {
	max-width: 100%;
	height: auto;
	width: auto;
}

Offline

#26 2023-12-12 19:14:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,436
Website GitHub

Re: Dimensionless img via height="0" width="0" works no more?

halftone wrote #336126:

I was trying to edit CSS through the Txp admin interface. Didn’t know public_html/css had an independent existence.

It depends on your theme. If the theme author hard-codes paths to your file system then Textpattern will fetch assets from there. If not, it will fetch them from the database (which is usually a fraction slower).

If you are editing the CSS in the admin interface and your theme is fetching assets from the file system, check the Save to drive box near the Save button and your changes to that asset will be stored directly to the filesystem too.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#27 2023-12-12 20:01:55

halftone
Member
Registered: 2011-12-22
Posts: 10

Re: Dimensionless img via height="0" width="0" works no more?

@bloatware

That is odd, but my fault. I had added

 /*  height: auto;    added by TS   */  

as a note for the site developer if he needs to know.

That was parsed as a comment in my browser and the img displayed just fine on PC and mobile (after clearing cache).
Apparently not seen as a comment in yours, but as a duplicate height: statement. Probably because it was within the .img {.. ..}
I have now removed it. There’s a backup copy of his screen.css anyway.

width: auto;

Seemed superfluous in view of max-width: 100% but I’ll add that.

@bloke

Thanks for the enlightenment! That does make sense, and in retrospect explains a lot of bemused exasperation.

Offline

#28 2023-12-12 20:11:25

halftone
Member
Registered: 2011-12-22
Posts: 10

Re: Dimensionless img via height="0" width="0" works no more?

footnote:
@ Bloatware

Of course you are right. Adding width so the statement is

img {
  max-width: 100%;
  width: auto;
  height: auto;
}

fixes the messed-up aspect ratios of the thumbnail links to other Showcases as well. Which was a minor problem I hadn’t even looked at yet…

Offline

Board footer

Powered by FluxBB