making images relative in size

Get help on web editors (Frontpage, Dreamweaver) and web languages (HTML, ASP, PHP).
Post Reply
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

making images relative in size

Post by DarkRanger »

Hi guys,

Just want to know how I can make images relative with size in a HTML page. I am only allowed to use basic HTML code.

If I resize, the images must also resize to still be lets say 30% of the window size.

Thanks.
Image
doo_much
Registered User
Posts: 26022
Joined: 13 May 2004, 02:00
Location: Getting there...
Contact:

Post by doo_much »

Code: Select all

<img border="0" src="your_background.jpg" width="###%" height="###%"></p>
MOOD - Thirsty

A surprising amount of modern pseudoscience is coming out of the environmental sector. Perhaps it should not be so surprising given that environmentalism is political rather than scientific.
Timothy Casey
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Post by DarkRanger »

that doesn't work. it makes the images x% of it's current width and height! thats the first thing I tried.
Image
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Post by DarkRanger »

sorted:

Code: Select all

<img scr="******.jpg" style="position:relative;widht:***%;height:****%>
Image
Anthro
Moderator Emeritus
Posts: 5547
Joined: 21 Dec 2002, 02:00
Processor: i7 3770k
Motherboard: ASUS P8P67-Pro
Graphics card: 2xNvidia GTX670
Memory: 16 GB Gskill Sniper
Location: In SQL Space inserting 'null' on purpose
Contact:

Post by Anthro »

Nicely done//
Where'd you get the solution ?
Temporary Absence
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Post by DarkRanger »

I answered my own question after reading my topic again and again... :-P

Another question. Any way I can specify that the image should not resize larger than it's original width and height (lets say 400px wide an 500px high)?

changed that to Any way..otherwise it durrent maketh sense
-Anthro
Image
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Post by DarkRanger »

Damn Anthro you're quick... BTW: What did I say??
Image
Anthro
Moderator Emeritus
Posts: 5547
Joined: 21 Dec 2002, 02:00
Processor: i7 3770k
Motherboard: ASUS P8P67-Pro
Graphics card: 2xNvidia GTX670
Memory: 16 GB Gskill Sniper
Location: In SQL Space inserting 'null' on purpose
Contact:

Post by Anthro »

You just had it as Anyway, read it like that and it wont make sense at all
Anyway I can specify that the image should not resize larger than it's original width and height (lets say 400px wide an 500px high)
:wink:
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Post by DarkRanger »

Haha, translate that to afrikaans.
DarkRanger's screw up in Afrikaans wrote:Elkgeval kan ek spesifiseer dat die prent nie moet van groter word as sy oorspronklike wydte en hoogte nie (bv. 400px wyd en 500px hoog)
:lol: :lol: Thanks man! waardeur dit! :)
Image
Post Reply