SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Datalist Height

rated by 0 users
This post has 4 Replies | 2 Followers

Top 50 Contributor
Posts 65
eric_tcp Posted: 01-04-2008 12:13 PM

I having a datalist which contains very small item, I did not set the height of the datalist but the problem is there is like a minimum height for datalist bacause even i jut put a dot (.) in the itemTemplate the height still the same.

below is my codes in aspx:

<asp:DataList ID="dl" runat="server" CellPadding="1" CellSpacing="0" RepeatDirection="Horizontal"

ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1" ItemStyle-VerticalAlign="bottom">

<ItemTemplate>

.

.

</ItemTemplate>

</asp:DataList>

 

I purposely put border so the you guys can see the actual output, below is the output:

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

 

 

What can i do so that i will get the datalist with no unnecessary space in between?

Top 10 Contributor
Posts 1,087
Ajax enabled?

microlau Blog: http://community.sgdotnet.org/blogs/microlau

Top 50 Contributor
Posts 65
Yes.
Top 10 Contributor
Posts 2,259
I do not believe the height of the cell is based on what's displayed but rather the point size of the font. Look at these text and observe how much taller normal alphanumeric characters are compared to the full-stop dot.

The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

Top 50 Contributor
Posts 65

You are right, i solved the problem by set the font size to smaller size.

Thanks.

Page 1 of 1 (5 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems