Formatting a radio button list?

Results 1 to 2 of 2

Thread: Formatting a radio button list?

  1. #1
    Join Date
    Dec 1969

    Default Formatting a radio button list?

    I have a simple radio button list that gets data bound to it. Works fine except the formatting is all screwed up.<BR><BR>When you view it on the page it shows the radio button on the left and the text on the right, but the text is so long it wraps under (which is fine) but it wraps under the radio button itself.<BR><BR>Is there any way to format these things so when the text wraps under it wraps under the first bit of text and not the actual radio button?<BR><BR>I tried using a p tag and a table tag in my SQL SP to try and wrap that text into it&#039;s own table and/or cell, which does the trick but the problem then is the radio button vertically aligns in the center instead of the top.<BR><BR>I then tried a repeated and made table rows and cells for each repeat as well as a radiobutton control, and it gives me the look I want but it won&#039;t recognize the groupname....meaning, if I have 5 RB&#039;s I can select all 5 because the group name doesn&#039;t appear on them.<BR><BR>Any ideas out there?

  2. #2
    Join Date
    Dec 1969

    Default RE: Formatting a radio button list?

    I set up a style in my stylesheet for my radio buttons and with wrapping off (default?) amongst other things. I use background colours to highlight the selection whilst I am at it.<BR><BR>My .css extract is ..<BR><BR>.radioOFF<BR>{<BR> COLOR: fuchsia;<BR> BACKGROUND-COLOR: silver<BR>}<BR>.radioON<BR>{<BR> LEFT: 0px;<BR> COLOR: #ffffff;<BR> FONT-STYLE: normal;<BR> WHITE-SPACE: normal;<BR> BACKGROUND-COLOR: palevioletred;<BR> FONT-VARIANT: normal<BR>}<BR><BR>Invoked by VB code..<BR>function Selector(MeItem,MeValue) as string<BR>&#039; Disabled radio buttons until EDIT selected <BR>&#039; Check appropriate buttons <BR>if AItem(MeItem)=MeValue then Selector=" checked class=radioON " else Selector="disabled class=radioOFF "<BR>end function <BR><BR>Used in datagrid column with ...<BR>&#060;asp:TemplateColumn HeaderText="Disabled Access" &#062;<BR>&#060;ItemTemplate&#062; &#060;input name="R13" type="radio" value="True" &#060;%=Selector(13,"True")%&#062; &#062;Yes<BR>&#060;/input&#062; <BR>&#060;input name="R13" type="radio" value="False" &#060;%=Selector(13,"False")%&#062; &#062;No&#060;/input&#062; &#060;/ItemTemplate&#062;<BR>&#060;/asp:TemplateColumn&#062; <BR><BR>Hope that is of help to you.<BR><BR>Mike<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts