Manipulate column width separately

User 9b22df29d8

06-02-2012 13:21:48

Hi


By changing .column section in search.css I can set column width in pixels but it applys to all columns.


Is there any way to manipulate columns width separately?


Maybe some modifications in search.css, search.xsl or index.html? (If yes then where)


I have to resize some user defined columns with comments in result spreadsheet and I cant figure it out how.


 


Thanks

ChemAxon ebbce65bcf

06-02-2012 16:36:03

Hi,


You should modify the template named by "result" in search.xsl. In the end of it you will find the following section you have to edit. There you can see a couple of examples about how to formulate conditional styling for a single column. I emphasized the important parts for you:



<xsl:for-each select="*">


<xsl:choose>


<xsl:when test="name() = 'cd_formula' or name() = 'CD_FORMULA'">


<td class="formula" style="width: 300px;"><div class="column"><xsl:value-of select="." /></div></td>


</xsl:when>


<xsl:when test="name() = 'logp' or name() = 'LOGP'">


<td><div class="column"><xsl:value-of select="format-number(., '#0.#', 'myFormat')" /></div></td>


</xsl:when>


<xsl:when test="name() = 'refractivity' or name() = 'REFRACTIVITY'">


<td><div class="column"><xsl:value-of select="format-number(., '#0.##', 'myFormat')" /></div></td>


</xsl:when>


<xsl:when test="name() = 'Molecule'">


</xsl:when>


<xsl:otherwise>


<td><div class="column"><xsl:value-of select="." /></div></td>


</xsl:otherwise>


</xsl:choose>


</xsl:for-each>


 



I hope this helps.


Regards,


Roland


 

User 9b22df29d8

07-02-2012 14:15:29

It helps me a lot. Everything is working now as I expected.


Thank you very very much