[thelist] aligning text within inline elements

Means, Eric D eric.d.means at boeing.com
Wed Jun 26 17:25:00 CDT 2002


>  -----Original Message-----
> From: 	Tom Dell'Aringa [mailto:pixelmech at yahoo.com]
> Sent:	Wednesday, June 26, 2002 5:16 PM
> To:	thelist at lists.evolt.org
> Subject:	[thelist] aligning text within inline elements
>
> As we've seen on some recent emails, text-align works well for
> aligning text in block level elements. My problem is this: I have
> this type of thing happening --
>
> ..wrapper tables and stuff
> <tr>
> <td>
>
> <span>A Title Word</span> <span>Links</span>
>
> </td>
> </tr>
>
> I need to get my Title word aligned LEFT, and my Links aligned RIGHT.

In the CSS for the left span:
span.left {
  float: left;
  width: 49%;
}
For the right span:
span.right {
  float: right;
  width: 49%;
}

(the widths should not add to 100% because IE's fudgy box model gets screwy,
but 98% works AFAIK.  If you need one span or the other larger, just change
the %s appropriately; 69%/29%, for instance).



More information about the thelist mailing list