468,792 Members | 1,730 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,792 developers. It's quick & easy.

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 1502
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
1 post views Thread by CARIGAR | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.