Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Dec 08, 2008 01:17
open dhtmlx forum
Text value alignment in grid

The cell values printed along with the image(.gif) is aligned to the bottom of the cell where as cell values without an image is aligned to the top of the cell. How can the cell values without an image be aligned to the bottom of the cell or vice versa?

The code snippet for the problem is given as :

<cell style="background-color:#83acd5;text-align:left;font-weight:bold;color:#000000;"><![CDATA[<div style="background-color:#83acd5;text-align:left;font-weight:bold;color:#000000;"><div style="height:20px; width:100%;position:relative;overflow:hidden;"><a href="javascript:wtShowHighlight(710.7);" onmouseover="return wtSetStatus(\'Click to display this item\');" onmouseout="return wtSetStatus(\'\');"><font color="#000000">therer</font></a></div></div>]]></cell>
<cell style="text-align:right;color:#000000;"><![CDATA[<div style="text-align:right;color:#000000;"><div style="height:20px; width:100%;position:relative;overflow:hidden;"><a style="text-decoration:none"><font color="#000000">100.00</font></a></div></div>]]></cell>
<cell style="text-align:right;color:#000000;"><![CDATA[<div style="text-align:right;color:#000000;"><div style="height:20px; width:100%;position:relative;overflow:hidden;"><a style="text-decoration:none"><font color="#000000">17,000.00</font></a></div></div>]]></cell>
<cell style="text-align:right;color:#000000;"><![CDATA[<div style="text-align:right;color:#000000;"><div style="height:20px; width:100%;position:relative;overflow:hidden;"><span>0.59% </span> <img onmouseover="iShowToolTip(iScorecardTooltipText(0, 50, 75), event);" onmouseout="hbiHideToolTip();" src= "//localhost/wtShared/images/bad.gif"><span style="vertical-align: super;font-size:75%; position:relative; top:1px; left:1px;">1</span> </div></div>]]></cell></row><row>
Answer posted by Support on Dec 08, 2008 01:34

The problem is not related to grid functionality, grid just renders content which you had provide.
In case of plain text values - vertical align can be set by setColVAlign. In your case extensive HTML formating used, which will override grid level behavior in any case.