[thelist] Aligning images left/right without tables

Tim Medlen tmedlen at pilotonline.com
Mon Sep 30 13:40:00 CDT 2002

Try positioning the div :

<div style="position:absolute; left:10px; top:15px; padding:10px;  border:
1px solid orange">
 *** code ***

 -this seems to work, otherwise it just sits on the page like a deflated
balloon, I believe because the div needs a reference point to build itself,
(I also threw in some padding)
..also, you may want to consider using 'align=right' for your image instead
of the float, as it seems to be buggy in Netscape

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"
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Image Float Problem</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<div style="border: 1px solid orange">
alt="" style="float: right" />
Some meaningless text here  Some meaningless text here Some meaningless text
here Some meaningless text here

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

Any ideas?


More information about the thelist mailing list