Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7880621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:11:18+00:00 2026-06-03T04:11:18+00:00

This should be a really simple one, but just cant get it to work.

  • 0

This should be a really simple one, but just cant get it to work. I have a database with lets say 20 items. I am using php to echo each item. my code is :

echo "<li> <a class='bodylinks' href='http://domain.co.uk/fish/$txt2/'>$txt</a> </li>";

My problem is that my page only has height for say 14 of the items, however I have spare width. How to I make it move over to the right creating a new column when the height is maxed out on the other column? Hope this makes sense.

At the moment it just displays down to the 14 item then because I have overflow:hidden on the containing DIV it cuts the rest off.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:11:19+00:00Added an answer on June 3, 2026 at 4:11 am

    you could use floats

    try this, it will print out your list items horizontally from ltr (default direction) and drop to next line – vertically.

    <li style="display:inline;"> contents </li>
    

    alternatively, make your loop count 14 rows, then at 14th, close your UL/OL tag and create a new one like so:

    <ul style="display:block; float:left;">
    <?php
    for($i = 0; $i = count($results); $i++) {
        $txt = $results['txt']; // or however you do
        $txt2 = $results['txt2']; // or however you do
        if($i > 0 && $i % 14 == 0) echo '</ul><ul style="display:block; float:left;">';
        echo "<li> <a class='bodylinks' href='http://domain.co.uk/fish/$txt2/'>$txt</a> </li>";
    ?>
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be really simple, but I have tried many solutions posted on the
It should quite simple algorithm, but I just can't get around it. I have
This seems like it should be really simple, but I'm unable to figure this
This is one of this things that should be extremely simple and I just
This should be really simple, but I can't seem to figure out what to
My problem seems to be really simple but I just can't get the reason
This should be really simple. I am using SSMS 2008, trying to get a
This should be a really really simple thing, but for some reason it is
This seems like it should be really easy but I couln't find an answer
This might be something very straight forward and I really think it should work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.