treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Having trouble with line breaks in a "title_li="

  • I was wondering if anyone can help me with a line break problem I am having. I have a list of pages that I believe is controlled by the following php code.

    <div class="sidebar-box">

    <ul>
    <?php wp_list_pages('title_li=&amp'); ?>
    </ul>
    <div class="clear"></div>
    </div>

    Current I have a list of pages that reads:

    "Page 1 Page 2 Page 3" and so on.

    What I want is a list with line breaks between the pages:

    Page 1
    Page 2
    Page 3

    If I had a list I would know how to insert them, but I am not sure how to do this with the "title_li" code. Am I even looking at the right source to do this or do I need to modify something else in order for it to work.

    Any help is greatly appreciated.

    Thanks
  • You don't need to put line breaks in a list. That is how a list will display by default, if it is displaying any other way it is because of the css. Look for the corresponding rules in the stylesheet.
  • It will undoubtedly be caused by rules specified in "<div class="sidebar-box">".