Log in

View Full Version : Resolved Difficulty Resizing



marain
09-20-2020, 05:45 PM
I have two .jpg files. I want them both to have height 191 px. Paint says they are both 191 px. Properties for both show 191 px. I specify size in html of 191 px. Yet they are both obviously different heights. Will someone please show me the error of my ways before I pull my hair out?

A.

coothead
09-20-2020, 06:20 PM
Hi there marain,


to help you with your problem we would need to actually see it. :)

Do you have a link to the page in question for us?

If not we need to see the page's HTML and CSS.



coothead

marain
09-20-2020, 07:13 PM
Coothead,

It's a slide show. The link to the page is https://www.njgunlawyers.com/page.php?here=FID . There are actually four images in the slide show, but if we are able to reconcile just the two shown in this thread, I'm confident the others will readily fall into place.

The one tool that occurred to me after posting the query was GIMP. I'm looking at that now.

A.

UPDATE: GIMP also reports the heights to be 191 px.

A.

coothead
09-21-2020, 08:30 AM
Hi there marain,


add this CSS to your njgunlawyers.css file...



#slide {
height: 256px; /* adjust this value to suit your taste */
width: auto;
}


It will make all the slide show images have the same height.

The value that I used seemed appropriate but you can change
it to suit any appearance that appeals to your peepers. :cool:


coothead

marain
09-21-2020, 12:44 PM
Coothead,

Very very strange. I inserted your suggested code into my css file. It appeared to have no effect. Then I put that same code into the html. That did not change the image size, but it did have an effect. Its effect was to insert vertical space between the images and the text that follows.

Color me flummoxed.

Thank you for applying your not inconsiderable talents to this problem.

A.

coothead
09-21-2020, 02:04 PM
I inserted your suggested code into my css file.
It appeared to have no effect. .

To test your assertion, I downloaded your njgunlawyers.css file,
inserted the code, that was suggested, at the bottom and then
saved the file.

Your page worked OK for me, as expected, when I used the
amended file.

This lead me to believe that you are experiencing an internet
cache problem.

Try using the F5 function key to clear it.

If this fails check out this link...

How to Clear Internet Cache in Every Major Browser (https://www.lifewire.com/how-to-clear-cache-2617980)


coothead

marain
09-21-2020, 02:41 PM
Clearing the cache by itself does not work. Opening the page in a private window does work--the image is resized as intended! Viewing the page in Google Chrome also works as far as the resizing is concerning. (I usually use Firefox.) However, ALL of the presentations show much blank space following all images.

Have I stepped into a parallel universe?

A.

coothead
09-21-2020, 06:47 PM
Have I stepped into a parallel universe?.

No you've just been a naughty boy. :o

When viewing "Page Source" of your page.php file
on line #62 I see this code...



<div id="slides" class="center" style="height: 256px; /* adjust this value to suit your taste */ width: auto; ">

Why did you add the code in red. :confused:

It is the cause of this observation of yours...


However, ALL of the presentations show much blank space following all images.

Remove it posthaste. :cool:

6401


coothead

marain
09-21-2020, 07:32 PM
Wow.

Answering your question, I put that line there because you advised me to. Except that I screwed up the height number, thus accounting for the blank spaces. Style information removed and, with its removal, gone is the blank space. This now works perfectly in Opera, Edge, and Chrome, but the images still do not resize in Firefox. Yes, I cleared the cache. So we've made much progress, with just that nettlesome Firefox perjinkity remaining. Since it works everywhere except Firefox, I'm tempted to just conclude that my cache was imperfectly cleared.

I'm going to mark this resizing problem as solved.

coothead
09-21-2020, 07:50 PM
Answering your question, I put that line there because you advised me to
You may think that I advised you to edit the HTML, but if you reread my
posts you will find that I only suggested adding code to your CSS file.

As a matter of interest, my testing and curing of the problem was done
using Firefox 80.0.1 browser, albeit on a Linux O.S. rather than a
Windows O.S. ;)

Also note that your page now works OK for me Firefox wise.

So, yes, retry the cache clearing methods.


coothead

marain
09-21-2020, 08:07 PM
I did a super duper cache purge, and it now works perfectly even in Firefox. God is in her heaven.

Yes, it was to the CSS file that you recommended that change. Little did I know that putting it into the html file might be significant. Regardless, I made missteps along the way, and appreciate your cures. (I still do not understand why it did not work correctly to begin with.)

coothead
09-21-2020, 08:43 PM
I still do not understand why it did not work correctly to begin with

C'est la vie

There was a time when an educated person could know and understand
almost all the currently available knowledge of the Universe.

Today this is evidently not at all possible, and will be more so in the future,

The more knowledge there is, the less we, personally, know and understand.

Society invented specialists in their field to cope with this problem.



coothead