Jump to content

Repeating Images


Ben

Recommended Posts

Hello,I visit your site every so often looking for help on html.I decided to register today because I have come across a problem.I searched your mainsite, but I couldnt find my answer.---How do I stretch an image to fit between two other images? And how do I add text above this image?Thanks. :)

Link to comment
Share on other sites

So lets see if I understand you.You have three images in a row. You want the middle one to stretch to fill up whatever space is left between the two outside images????first off you cannot make and image stretch (you could hack something together with javascript but the proportions would probably be off) but I can show you how to place 3 images in a row and place text over top of the middle image (you wanted the text over the middle image right?).There are 2 approaches, using tables or not using tables.Tables is the easiest but designers seem to be moving away from this opting for the tableless design.1. Tables

<table><tr><td></td><td>Text above middle image</td><td></td></tr><tr><td><img src="img1.gif"></td><td><img src="img2.gif"></td><td><img src="img3.gif"></td></tr></table>

2. Without tables

<div>text....blah.<br /><img src="" style="float:left"><img src="" style="float:left"><img src="" style="float:left"><br style="clear:left" /></div>

Hope this answers your question

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...