[thelist] Aligning images left/right without tables

Aaron Cole awcole72 at hotmail.com
Mon Sep 30 12:34:01 CDT 2002


Hello All,

I'm looking for a way to align an image that exists inside of a <div> to the
left or right of the text in that <div>.  I've tried just floating the
images right or left, but if the vertical space of the text isn't large
enough, the image overlaps the <div> edge.

Here's my code:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Image Float Problem</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>
<div style="border: 1px solid orange">
<p>
<img
src="http://i.cnn.net/cnn/2002/WORLD/europe/09/30/vienna.iraq/story.file.ap.jpg"
alt="" style="float: right" />
Some meaningless text here  Some meaningless text here Some meaningless text
here Some meaningless text here
</p>
</div>
</body>
</html>

By the way, I'm looking for a tableless solution.

Any ideas?

TIA,
Aaron



_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx




More information about the thelist mailing list