JavaScript and client side scripting.
Moderator: General Moderators
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Sat Nov 20, 2004 1:06 pm
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 {
background-color: #DECDBC;
border: 1px solid #95612F;
height: auto;
text-align: left;
width: 100%;
}
#block img {
margin-right: 5px;
}
#block td {
padding-left: 3px;
}
#block th {
background-color: #95612F;
color: #E0D1C3;
font-size: 1.0em;
font-weight: bold;
padding: 1px 1px 2px 3px;
vertical-align: middle;
}
djot
Forum Contributor
Posts: 313 Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:
Post
by djot » Sat Nov 20, 2004 4:19 pm
-
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
-
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Sat Nov 20, 2004 4:33 pm
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 » Sat Nov 20, 2004 4:39 pm
-
Hi,
you are right MarK, this does work.
djot
-
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Sun Nov 21, 2004 5:31 am
it doesn't work for me, image goes one row under.
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Sun Nov 21, 2004 5:58 am
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>
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Sun Nov 21, 2004 6:18 am
ok let me try it.
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Sun Nov 21, 2004 8:26 am
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.
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Sun Nov 21, 2004 8:32 am
ok. i did it, i made a margin-top style for it and it's even in the middle. thanks mark
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Sun Nov 21, 2004 8:49 am
Great