Line spacing for ListItems

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.
 
M

Masudur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,244
Members
46,838
Latest member
KandiceChi

Latest Threads

Top