Line spacing for ListItems

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

I have a BulletedList in my ASP.NET application, and I want the ListItems to
have 1 blank line between them. However, Visual Studio will not let me nest
tags in the ListItems, and the ListItem does not seem to support the style
attribute either. Does anybody have any ideas? Thanks.
 
I have a BulletedList in my ASP.NET application, and I want the ListItems to
have 1 blank line between them. However, Visual Studio will not let me nest
tags in the ListItems, and the ListItem does not seem to support the style
attribute either. Does anybody have any ideas? Thanks.

Hi...
It's easy... loop through the items and then add the style attribute
of each item as you wanted or perhaps specify a css class if you
want...

here is a code sample...

foreach (ListItem item in BulletedList1.Items)
{
item.Attributes.Add("style", "padding-bottom:
20px;color:red");
}

Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
 
Back
Top