Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. CSS radioButton list

CSS radioButton list

Scheduled Pinned Locked Moved ASP.NET
csssysadmintutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MichaeltCheong
    wrote on last edited by
    #1

    <asp:RadioButtonList ID="RadioButtonList1" runat="server"
    RepeatLayout="flow" style="color: #FF0000" >
    <asp:ListItem Selected="True" class="margin">Clothing</asp:ListItem>
    <asp:ListItem class="margin">Shoes</asp:ListItem>
    <asp:ListItem class="margin">Beg</asp:ListItem>
    </asp:RadioButtonList>

    can anyone told me how to make the font larger when i'm selected on particular radio button list ~ what is the CSS style code

    J 1 Reply Last reply
    0
    • M MichaeltCheong

      <asp:RadioButtonList ID="RadioButtonList1" runat="server"
      RepeatLayout="flow" style="color: #FF0000" >
      <asp:ListItem Selected="True" class="margin">Clothing</asp:ListItem>
      <asp:ListItem class="margin">Shoes</asp:ListItem>
      <asp:ListItem class="margin">Beg</asp:ListItem>
      </asp:RadioButtonList>

      can anyone told me how to make the font larger when i'm selected on particular radio button list ~ what is the CSS style code

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      The radio button seems to be a group of elements, input and span tags. You would have to use jquery to alter the assigned class or style value of the label after the input tag, using something like, Set a Javascript event to listen for radio button value change, and when the event fires, run a function to alter the CSS of the label tag. http://stackoverflow.com/questions/6505857/how-to-get-the-text-after-a-radio-button[^] I can do it with drop down list, never done it with radio buttons, I might need to do some more research on this. [edit] you may have to run each on every radio button to set the font back to normal, and then change the font on the selected one. I think next sibbling will move from the input tag to the label for adjustment.

      R M 2 Replies Last reply
      0
      • J jkirkerx

        The radio button seems to be a group of elements, input and span tags. You would have to use jquery to alter the assigned class or style value of the label after the input tag, using something like, Set a Javascript event to listen for radio button value change, and when the event fires, run a function to alter the CSS of the label tag. http://stackoverflow.com/questions/6505857/how-to-get-the-text-after-a-radio-button[^] I can do it with drop down list, never done it with radio buttons, I might need to do some more research on this. [edit] you may have to run each on every radio button to set the font back to normal, and then change the font on the selected one. I think next sibbling will move from the input tag to the label for adjustment.

        R Offline
        R Offline
        Rockstar_
        wrote on last edited by
        #3

        Yes, I agree... I think we can do this using JQuery very easy and fast....

        1 Reply Last reply
        0
        • J jkirkerx

          The radio button seems to be a group of elements, input and span tags. You would have to use jquery to alter the assigned class or style value of the label after the input tag, using something like, Set a Javascript event to listen for radio button value change, and when the event fires, run a function to alter the CSS of the label tag. http://stackoverflow.com/questions/6505857/how-to-get-the-text-after-a-radio-button[^] I can do it with drop down list, never done it with radio buttons, I might need to do some more research on this. [edit] you may have to run each on every radio button to set the font back to normal, and then change the font on the selected one. I think next sibbling will move from the input tag to the label for adjustment.

          M Offline
          M Offline
          MichaeltCheong
          wrote on last edited by
          #4

          ok thx ~ i try on it :-O

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups