472,145 Members | 1,432 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

How can I force an image on the right in IE, NS and Firefox?

Hi,
I have a jsp that generates rows (depending on how many records are
available in the database) with data and an image and each row
alternates its color.
In each <tr> I have 2 <td>: one for data and one for the image. The
jsp defines a variable for the color --> this variable is then used as
a css selector:

td.rowLight and td.rowDark

Since each row must have an alternate color I have defined a css for
this <td>, let say
class="rowLight" and class="rowDark".
Each selector has a property "text-align: left" for the data. But the
image have to be positioned on the right of its own <td> and this must
be done for :

IE 5.5/6.0
NS 6.x/7.x
Firefox 1.0

How can I do this? Can anybody help me?

Thanks for yourr answers and a Happy New Year.
John
Jul 21 '05 #1
1 1561
John wrote:
Hi, I have a jsp that generates rows (depending on how many records
are available in the database) with data and an image and each row
alternates its color. In each <tr> I have 2 <td>: one for data and
one for the image. The jsp defines a variable for the color -->
this variable is then used as a css selector:

td.rowLight and td.rowDark
Add:

td.toright { text-align: right; )
Since each row must have an alternate color I have defined a css
for this <td>, let say class="rowLight" and class="rowDark". Each
selector has a property "text-align: left" for the data. But the
image have to be positioned on the right of its own <td> and this
must be done for :


<td class="rowLight toright"><img ...></td>
<td class="rowDark toright"><img ...></td>

text-align: left is the default and can probably be eliminated.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by bdwise | last post: by
reply views Thread by Jake | last post: by
1 post views Thread by Marco Maroni | last post: by
5 posts views Thread by Richard Shewmaker | last post: by
2 posts views Thread by =?Utf-8?B?UnVpIE9saXZlaXJh?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.