rmatthew Posted March 5, 2003 Posted March 5, 2003 I need to evenly space the columns generated by a checkbox list. What I do is populate the items of a checkboxlist from a database and as some values are longer/shorter, the columns space accordingly. Is there any way to make these columns evenly spaced? Thanks in advance Quote
moshecohen2001 Posted April 12, 2006 Posted April 12, 2006 Ok... This is what you have to do. Modify the data to enclose each field value inside a Label control. Set the label control's width property to the fixied width you did like to have. The trick will be to later on (when the user submits the form) retrieve the values. You will get a value with an added Label element. You will have to parse out the value from the full returned string. What I did is to split the string using the "<" and ">" characters as separators (of course, I used the "split" function for that. I did it and it worked fine with me. Quote
moshecohen2001 Posted April 13, 2006 Posted April 13, 2006 Ok I came up with a better solution. You have two possibilities: a. If you have a style sheet on your page, add a "Label" element with a "Width" property set to the desired width. b. If you don't have a style sheet in your page, create a new one and just add one "Label" element with a width property set to the desired width. Then reference the style sheet on the top of your page by adding <link href="YourNewStyleSheet.css" type="TEXT/CSS" rel="stylesheet"> to the <head> section of your page. That should do the trick. Hope this helps. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.