471,596 Members | 826 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,596 software developers and data experts.

Inline list items taking up two lines


I've got an inline list with a label and checkbox in each list item, each item comes from a MySQL database and, chances are that, in future, the list will become longer.

My problem is that in IE6 and 7 one list item is split over 2 lines (i.e. the label is on one line and the checkbox is on the next line), so it looks kinda ugly, not to mention causing usability issues for less experienced users.

Is there any way I can force list items to only appear on one line without breaking the formatting that I currently have? The offending page is here:


Thank you in advance!!

Apr 23 '08 #1
5 3652
7,435 Expert 4TB
See if removing the styles for .checkbox does anything. Maybe, first, try adding 'display:block' to .checkbox.

And people wonder why I call IE the worst browser on the planet.
Apr 23 '08 #2
490 Expert 256MB
hiya, the doc gave me an idea.

this is how i solved it.... let me know if its anygood...

Expand|Select|Wrap|Line Numbers
  1. #interest ul li{
  2. display:block;
  3. float:left;
  4. border: 1px solid #ff0000;
  5. width:125px;
  6. }
Hope it helped
Apr 23 '08 #3
490 Expert 256MB
Hi again... LOL i was still working on it when you changed the CSS.... anyway also try out this css property....

Expand|Select|Wrap|Line Numbers
  1. white-space: nowrap;
Apr 23 '08 #4
He he! Yeah, I'm quick, I'll give myself that! Your original suggestion works pretty well - think I'm going to adapt that. I've tried the white-space property before, all I get is one long line of content.

Thanks both of you for your help :)
Apr 23 '08 #5
490 Expert 256MB
no problems. just happy to help
Apr 23 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

17 posts views Thread by Thomas M. | last post: by
1 post views Thread by Desigan Chinniah | last post: by
25 posts views Thread by Haines Brown | last post: by
7 posts views Thread by Srini | last post: by
4 posts views Thread by Tony Johansson | last post: by
18 posts views Thread by Method Man | last post: by
5 posts views Thread by CES | last post: by
2 posts views Thread by steve.higgins | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.