image on right

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

image on right

Post by mudkicker »

Hey people,
I have a little problem with css.
i have a table like this:

Code: Select all

<table width="100%"  border="0" cellspacing="0" cellpadding="0" id="block"> 
					<tr> 
						<th scope="col"><img src="ui/dot.gif" alt="" />module name<img src="ui/arr.gif" alt="" width="10" height="9" /></th> 
					</tr> 
					<tr> 
						<td>module info</td> 
					</tr> 
				</table>
arr.gif should be near the right border even everything is aligned to left.
How can i set this?

These are the css properties for this table:

Code: Select all

#block &#123;
	background-color: #DECDBC;
	border: 1px solid #95612F;
	height: auto;
	text-align: left;
	width: 100%;
&#125;

#block img &#123;
	margin-right: 5px;
&#125;

#block td &#123;
	padding-left: 3px;
&#125;

#block th &#123;
	background-color: #95612F;
	color: #E0D1C3;
	font-size: 1.0em;
	font-weight: bold;
	padding: 1px 1px 2px 3px;
	vertical-align: middle;
&#125;
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post by djot »

-
Hi,

You can't. How would you devide content within only ONE table cell to be aligned left AND right at the same time?
This is not logic and therefor impossible this way.
To have two cells in the header row would have been the easiest way.

djot
-
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post by MarK (CZ) »

Why not just 'align="right"' for IMG? Or 'style="float: right;"'.
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post by djot »

-
Hi,

you are right MarK, this does work.

Code: Select all

style="float: right;"

djot
-
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

it doesn't work for me, image goes one row under.
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post by MarK (CZ) »

Try putting it like this:

Code: Select all

<th scope="col"><img src="ui/dot.gif" alt="" style="float: left;" /><img src="ui/arr.gif" alt="" style="float: right;" width="10" height="9" />module name</th>
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

ok let me try it.
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

ok but now thay are not aligned veritcally.. they stay too high for text.

you can look at it:

http://mudkicker.no-ip.com/mud_new/index.htm

oh only this solved and i'm free to go! grr... :(
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post by MarK (CZ) »

what about this one?

Code: Select all

<TH scope=col><IMG style="float: right;" height=9 alt="" src="mudkicker_com_files/arr.gif" width=10><IMG alt="" src="mudkicker_com_files/dot.gif">module name</TH>
The right one isn't exactly in the middle of the text but it's not that visible.
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

ok. i did it, i made a margin-top style for it and it's even in the middle. thanks mark
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post by MarK (CZ) »

Great :)
Post Reply