Recent

Author Topic: Dynamically resize image  (Read 13532 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • Master of Nothing
  • Administrator
  • Ninja Warlord
  • *****
  • Posts: 38684
  • Gender: Male
    • B4Print.com
  • Gender: male
Dynamically resize image
« on: September 02, 2010, 03:16:52 PM »
I've inherited this code from a previous developer:

Code: [Select]
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" height="85%" />



The intent there is to have the image be at 85% of the size of the site and the image dynamically scales proportionately if the user resizes the window...all the way down to fit on the iPhone/iPad. It works in Firefox but freaking Safari butchers it to death. I need to to work in all browsers. Anyone know how to accomplish this either via html or CSS?
Mac OS 11.5.2 Big Sur | Prinergy 9.0.1.125 | Adobe Creative Cloud 2021 | TWO Fuji CTP Units

I'm Sorry I Hurt Your Feelings When I Said You Were Stupid. I Honestly Thought You Already Knew

Offline Syphon

  • Hero Member
  • *****
  • Posts: 763
  • Gender: Male
    • Linkedin
  • Gender: male
Re: Dynamically resize image
« Reply #1 on: September 02, 2010, 08:27:33 PM »
Afraid of coding and not touching this.  <Backing out of this thread.>
Freelance Designer | Illustrator | Photo Editor
iMac • Mac OSX 10.15 Catalina
Affinity Publisher • Affinity Photo • Affinity Designer
Adobe InDesign • Adobe Photoshop • Adobe Illustrator
Adobe Acrobat

Offline gnubler

  • Ninja Warlord
  • ***
  • Posts: 28334
  • Gender: Male
  • Amerkin
Re: Dynamically resize image
« Reply #2 on: September 02, 2010, 08:49:50 PM »
Sorry, Joe. I'm backing out, too. Go ask the nerds at webdevforums, that's where I used to hang out.
Hicks • Cross • Carlin • Kinison • Parker • Stone •  Colbert • Hedberg • Stanhope • Burr

"As much as I'd like your guns I prefer your buns." - The G

So,  :drunk3: i send the job to the rip with live transparecy (v 1.7 or whatever) and it craps out with a memory error.

Member #14 • Size 5 • PH8 Unit 7 • Paranoid Misanthropic Doomsayer • Printing & Drinking Since 1998 • doomed ©2011 david

Offline Joe

  • Master of Nothing
  • Administrator
  • Ninja Warlord
  • *****
  • Posts: 38684
  • Gender: Male
    • B4Print.com
  • Gender: male
Re: Dynamically resize image
« Reply #3 on: September 02, 2010, 08:53:08 PM »

Sorry, Joe. I'm backing out, too. Go ask the nerds at webdevforums, that's where I used to hang out.


Shit, I was counting on you! :angry:
Mac OS 11.5.2 Big Sur | Prinergy 9.0.1.125 | Adobe Creative Cloud 2021 | TWO Fuji CTP Units

I'm Sorry I Hurt Your Feelings When I Said You Were Stupid. I Honestly Thought You Already Knew

Offline Syphon

  • Hero Member
  • *****
  • Posts: 763
  • Gender: Male
    • Linkedin
  • Gender: male
Re: Dynamically resize image
« Reply #4 on: September 03, 2010, 07:35:59 AM »
Well Joe, I believe you just found a way to clear a room. Or a thread in this case. :grin:
Freelance Designer | Illustrator | Photo Editor
iMac • Mac OSX 10.15 Catalina
Affinity Publisher • Affinity Photo • Affinity Designer
Adobe InDesign • Adobe Photoshop • Adobe Illustrator
Adobe Acrobat

Offline gnubler

  • Ninja Warlord
  • ***
  • Posts: 28334
  • Gender: Male
  • Amerkin
Re: Dynamically resize image
« Reply #5 on: September 03, 2010, 09:01:56 AM »
Cool, can we jack it now? I hate to see a fresh thread with so much potential just go to waste.
Hicks • Cross • Carlin • Kinison • Parker • Stone •  Colbert • Hedberg • Stanhope • Burr

"As much as I'd like your guns I prefer your buns." - The G

So,  :drunk3: i send the job to the rip with live transparecy (v 1.7 or whatever) and it craps out with a memory error.

Member #14 • Size 5 • PH8 Unit 7 • Paranoid Misanthropic Doomsayer • Printing & Drinking Since 1998 • doomed ©2011 david

Offline Stiv

  • Ninja Member
  • *
  • Posts: 1625
  • Gender: Male
  • I'm a few crows short of a murder.
Re: Dynamically resize image
« Reply #6 on: September 03, 2010, 09:37:43 AM »

Cool, can we jack it now?


What you do in private is your own business.

Offline Joe

  • Master of Nothing
  • Administrator
  • Ninja Warlord
  • *****
  • Posts: 38684
  • Gender: Male
    • B4Print.com
  • Gender: male
Re: Dynamically resize image
« Reply #7 on: September 03, 2010, 11:55:58 AM »
Well I figured out the answer in case anyone needs to know. Change

Code: [Select]
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" height="85%" />


to

Code: [Select]
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" />
« Last Edit: September 03, 2010, 09:05:36 PM by Joe »
Mac OS 11.5.2 Big Sur | Prinergy 9.0.1.125 | Adobe Creative Cloud 2021 | TWO Fuji CTP Units

I'm Sorry I Hurt Your Feelings When I Said You Were Stupid. I Honestly Thought You Already Knew

Offline DigitalCrapShoveler

  • Mighty Joe's Son
  • Supreme Ninja
  • ***
  • Posts: 23057
  • Gender: Male
  • Let me know if you're a size 14.
Re: Dynamically resize image
« Reply #8 on: September 03, 2010, 12:16:27 PM »

Well I figured out the answer in case anyone needs to know. Change

Code: [Select]
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" height="85%" />

to

Quote
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" />



Whew! I'll sleep better.
Bates  •  Vorhees  •  Meyers  •  Krueger  •  Hobbs  •  Lecter  •  Dollarhyde  •  Bateman  •  Gumb  •  Doe  •  Morgan •  Todd •  Kevin •  DCS •  Kasem

"Does it really matter? There's shit in the meat and we're all pink inside. Live a little..." The Gnub

"I look forward to the sweet release of death..." Dave, on behalf of all Prepress

Member #285 • OG PH8 • Award-Winning • Population Control Enthusiast • Master of Freehand Jobs • Hater of All • Prodigy of Addition & Subtraction

Offline Joe

  • Master of Nothing
  • Administrator
  • Ninja Warlord
  • *****
  • Posts: 38684
  • Gender: Male
    • B4Print.com
  • Gender: male
Re: Dynamically resize image
« Reply #9 on: September 03, 2010, 12:32:44 PM »


Well I figured out the answer in case anyone needs to know. Change

Code: [Select]
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" height="85%" />

to

Quote
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" />



Whew! I'll sleep better.


Which is why I posted the solution.
Mac OS 11.5.2 Big Sur | Prinergy 9.0.1.125 | Adobe Creative Cloud 2021 | TWO Fuji CTP Units

I'm Sorry I Hurt Your Feelings When I Said You Were Stupid. I Honestly Thought You Already Knew

Offline DigitalCrapShoveler

  • Mighty Joe's Son
  • Supreme Ninja
  • ***
  • Posts: 23057
  • Gender: Male
  • Let me know if you're a size 14.
Re: Dynamically resize image
« Reply #10 on: September 03, 2010, 12:34:44 PM »



Well I figured out the answer in case anyone needs to know. Change

Code: [Select]
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" height="85%" />

to

Quote
<img src="http://www.somesite.com/header.jpg" alt="Lamp" width="85%" />



Whew! I'll sleep better.


Which is why I posted the solution.


Goddamn, I'd admire you.
Bates  •  Vorhees  •  Meyers  •  Krueger  •  Hobbs  •  Lecter  •  Dollarhyde  •  Bateman  •  Gumb  •  Doe  •  Morgan •  Todd •  Kevin •  DCS •  Kasem

"Does it really matter? There's shit in the meat and we're all pink inside. Live a little..." The Gnub

"I look forward to the sweet release of death..." Dave, on behalf of all Prepress

Member #285 • OG PH8 • Award-Winning • Population Control Enthusiast • Master of Freehand Jobs • Hater of All • Prodigy of Addition & Subtraction

Offline gnubler

  • Ninja Warlord
  • ***
  • Posts: 28334
  • Gender: Male
  • Amerkin
Re: Dynamically resize image
« Reply #11 on: September 03, 2010, 12:46:40 PM »
I "looked into it" a bit and noticed there are also techniques for sizing images with em units. I've never gotten into that.
Hicks • Cross • Carlin • Kinison • Parker • Stone •  Colbert • Hedberg • Stanhope • Burr

"As much as I'd like your guns I prefer your buns." - The G

So,  :drunk3: i send the job to the rip with live transparecy (v 1.7 or whatever) and it craps out with a memory error.

Member #14 • Size 5 • PH8 Unit 7 • Paranoid Misanthropic Doomsayer • Printing & Drinking Since 1998 • doomed ©2011 david

Offline tapdn

  • Ninja Master
  • **
  • Posts: 7775
  • Gender: Male
Re: Dynamically resize image
« Reply #12 on: September 03, 2010, 06:52:59 PM »
backslash backslash semi-something something-or-the-other isn't it?
usually fried mate - sometimes pickled - often scrambled - never beaten
~ Sir B. Monsteaure
No, he's well within his rights to diss cake. Pie, on the other hand, is waaaayyyy off limits.
~Youston
I'm just a stupid printer WTF do I know
~Farabomb

Offline Joe

  • Master of Nothing
  • Administrator
  • Ninja Warlord
  • *****
  • Posts: 38684
  • Gender: Male
    • B4Print.com
  • Gender: male
Re: Dynamically resize image
« Reply #13 on: September 03, 2010, 06:54:07 PM »

backslash backslash semi-something something-or-the-other isn't it?


I thought that was the code for unlimited lives on The Legend of Zelda?
Mac OS 11.5.2 Big Sur | Prinergy 9.0.1.125 | Adobe Creative Cloud 2021 | TWO Fuji CTP Units

I'm Sorry I Hurt Your Feelings When I Said You Were Stupid. I Honestly Thought You Already Knew

Offline Tracy

  • Ninja Master
  • **
  • Posts: 8338
  • Gender: Female
Re: Dynamically resize image
« Reply #14 on: September 03, 2010, 07:55:01 PM »
that's cool you figured it out, I took an html class awhile back, seems there's a lot more
ways to solve problems now.
I may have to check it out if I have any spare time someday :undecided: