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 8447825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:16:23+00:00 2026-06-10T10:16:23+00:00

My question is simple. First off, take a look at this code: http://jsfiddle.net/Jk8Nr/ All

  • 0

My question is simple.

First off, take a look at this code:

http://jsfiddle.net/Jk8Nr/

All I have is a very simple table with some padding, borders, text-alignment.

If you visit the jsFiddle above, you can increase the width of the results window and all of the table items will site comfortably. However, if you decrease the width of said window, I want the table cells to move the the second row in order so that side-scrolling isn’t required.

I don’t mind using <ul><li> for this instead of tables, but I do want to be able to do this.

If anyone is familiar with a solution, please let me know. I don’t mind using jQuery/JS/CSS, but I’m not familiar with much else.

Update

Here’s the updated jsFiddle with working solution:

http://jsfiddle.net/Jk8Nr/3/

  • 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-10T10:16:24+00:00Added an answer on June 10, 2026 at 10:16 am

    I agree with the other posters suggesting you use a list instead of a table. You can then use a media query to force a wrap at a given device-width if you want that level of control over the layout. Here’s an example setting a breakpoint at 600px (markup then css)

    <header>
        <ul>
            <li>Home</li>
            <li>Gallery</li>
            <li>Location</li>
            <li>Rates</li>
            <li>Contact</li>
        </ul>
    </header>​
    
    ul {
        width:100%;
    }
    li {
        width:118px;
        float:left;
        clear:left;
        padding:5px 0;
        border: 1px solid #000; 
        border-bottom:none; 
        text-align:center;            
    }
    li:last-child {
        border-bottom:1px solid #000;
    }
    
    @media (min-width:600px) {
        li {
            clear:none;
            border-bottom:1px solid #000;        
            border-right:none;
        }
        li:last-child {
            border-right: 1px solid #000;
        }
    }
    

    http://jsfiddle.net/Jk8Nr/8/
    ​

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off, I'm sure this is a simple question. I'm just getting started with
A simple question: Why does this the first code work but the seemingly identical
First off--thanks for having a look. MY QUESTION In a .NET web app, is
my question seems simple and stupid but first read this, suppose you have a
First off, I'm sorry for asking such a simple question in such a sophisticated
this is my first question on here. The question is simple - # this
This is just a simple question. Either way works. I prefer my first example,
Question simple and quick: I have started to use Netbeans to write some code
This may be a simple question, but I have been Googling for over an
This is probably a very simple question that I am working through in an

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.