SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Want to keep the checkbox by the word

  1. #1
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    538
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Want to keep the checkbox by the word

    I've got this fiddle:

    http://jsfiddle.net/tryin_to_learn/9awne/

    in the ul, I want the checkbox and word to stay on the same line, no matter what the screen resolution. I've tried putting white-space:nowrap on the li's and also on the labels but nothing seems to work. It seems like it should be so easy but it's got me stumped.

    Appreciate any help.

  2. #2
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,453
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    If you wrap each checkbox and label pair in a div that is set with a display: inline-block, that should work.
    Here's a discussion of this very subject: http://stackoverflow.com/questions/1...-the-same-line

    Edit: Sorry, should have looked at your fiddle more closely.
    Code CSS:
    #selectNoteList ul li {
      display: inline-block;
      padding-right: 7px;
    }
    This should work.
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

  3. #3
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    538
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That did it, Pullo. Thanks.

Tags for this Thread

Bookmarks

Posting Permissions

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