Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2006
    Location
    Bahrain
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    UL must not have any linebreaks

    HELP!
    I hate breaks to have lines. this is my code:
    Code:
    <ul>
    <li>some text here</li>
    </ul>
    <ul>
    <li>some text here</li>
    </ul><ul>
    <li>some text here</li>
    </ul><ul>
    <li>some text here</li>
    </ul><ul>
    <li>some text here</li>
    </ul>
    ALWAYS remember to validate your code

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    HTML:
    Code:
    <ul>
    <li>some text here</li>
    <li>some text here</li>
    <li>some text here</li>
    <li>some text here</li>
    <li>some text here</li>
    </ul>
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    If you need the nested ULs, for example some of the popular menus out there, you can also set display to inline rather than block in your CSS.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,372
    Thanks
    32
    Thanked 286 Times in 280 Posts
    Your code doesn’t make sense since a list of one item is not a list. Still, the way you would make all of that text flow onto one line would be CSS:

    Code:
    ul, li { display: inline; }
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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