English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

What is the html code for making a small jpg picture on a website page enlarge when you click on it? And where do you place that code on your website page to make it work properly, or do you place it on the picture? I'm a newbie at html.

2006-08-07 09:21:19 · 5 answers · asked by sophieb 7 in Computers & Internet Programming & Design

5 answers

You need to think about this a little differently. Rollover effects allow you to switch images on certain events such as hover (cursor over image) and click ("active" in CSS terms). Anyway, you need two images -- one for the standard state and another to show on the active state.



Note the NAME property of IMG is the same as the beginning of ".src" in onmouseover and onmouseout. The code above is an image used as a link, with a rollover on hover, which is the most common rollover. If you want to change the image only on a click, change onmouseover to onclick.

2006-08-07 09:35:55 · answer #1 · answered by cdg1111us 2 · 1 0

That takes some incredibly stepped ahead CSS. What you're talking about a is a fluid format. it truly is significantly better troublesome to attain a severe high quality fluid format that works on all browsers and resolutions then a troublesome and quickly format, this why you'll locate that maximum web content even substantial web content like yahoo us restoration layouts. in case you incredibly want to bypass with a fluid format you need to google something like CSS fluid format and start up studying and experimenting.

2016-11-23 14:41:32 · answer #2 · answered by ? 4 · 0 0

the effect you are looking for can be archived with javascript. it cannot be done with html alone.

you can try the following code

insert the below code in the head of your html document



The image tag should look something like this



Hope that helps

2006-08-07 09:41:03 · answer #3 · answered by americanDesi 2 · 0 0

to make it enlarge you need two images, lets call them img.jpg and imgLarge.jpg.

You can then use the tag:


When a user clicks on the image it will get large.

If you want to make it small again you will need to use more complicated javascript than i just gave you, but I can help if you need it.

2006-08-07 09:38:08 · answer #4 · answered by John J 6 · 0 0

You can also try this.




change the width and height to how small you want the picture to appear in your webpage.

2006-08-07 10:41:49 · answer #5 · answered by dm-dnd 3 · 0 0

fedest.com, questions and answers