SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    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
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,312
    Mentioned
    178 Post(s)
    Tagged
    8 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.

  3. #3
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    573
    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
  •