Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: ProtectOurFreedom

That could be. I may well misunderstand the concept of using a width percentage.

I assumed that if an image is 1000 pixels wide, when posting it with a “width=50%” tag, that it would post an image 500 pixels wide.

And a 2000 pixel image would display as an image 1000 pixels wide. It didn’t occur to me that it would be otherwise.

I will have to look now. Thanks for the correction.


31 posted on 04/28/2025 11:12:47 AM PDT by rlmorel ("A people that elect corrupt politicians are not victims...but accomplices." George Orwell)
[ Post Reply | Private Reply | To 28 | View Replies ]


To: rlmorel

The image width scales dynamically based on the “parent container’s” width. For example, width = “50%” makes the image half the width of its container. If the container’s width changes (e.g., due to browser resizing or responsive design), the image width adjusts proportionally. You can try this by resizing your browsers window.

Here’s another handy feature. If the “container” is a table cell, the width of the image will change to fit the table cell width. You can use this to make a table with an image the full width of a cell and another cell below or to the right for a caption some text

Using the Width attribute as a percentage, the aspect ratio is preserved unless overridden by another (e.g., height).

More than you wanted to know, I’m sure!


40 posted on 04/28/2025 11:46:01 AM PDT by ProtectOurFreedom (“Diversity is our Strength” just doesn’t carry the same message as “Death from Above”)
[ Post Reply | Private Reply | To 31 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson