Forum Moderators: not2easy

Message Too Old, No Replies

Help! Link makes images stair-stepping down

What am I doing wrong?

         

Jeremy_H

4:37 am on Oct 7, 2005 (gmt 0)

10+ Year Member



In Firefox, if I have a link above my images, the images stair-step down the page.

If I remove this link, then the images display on the same line, as intended.

Internet Explorer always shows the images on the same line, regardless of link.

Anybody have a clue as to what I am doing wrong?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<style type="text/css">
a img{float:left;padding:25px 25px 50px 25px;border:1px solid #000;margin-right:10px;margin-bottom:50px}
</style>
</head>

<body>
<a href="index.html">Home</a>
<p><a href="1.jpg"><img src="t1.jpg"></a></p>
<p><a href="2.jpg"><img src="t2.jpg"></a></p>
<p><a href="3.jpg"><img src="t3.jpg"></a></p>
<p><a href="4.jpg"><img src="t4.jpg"></a></p>
</body>
</html>

Setek

5:31 am on Oct 7, 2005 (gmt 0)

10+ Year Member



You've set your images to float left; this will have them sit in that sort of way.

Seeing as you want them just below each other, and you've got them in p tags, set your p tags to clear: both;

- and that should work :)

Setek

5:50 am on Oct 7, 2005 (gmt 0)

10+ Year Member



Oh! Sorry, you want the images all on the same line?

You know, you can just put them side by side in the html... but, if you want to use float, put a clear on the first p tag of images, and leave the rest, that should fix it.

*tired*

Jeremy_H

11:53 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



Thank you so much Setek. For the life of me I don’t even know why I was using paragraph tags around each image?

Thanks!