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

  • Home
  • SEARCH
  • 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 6322991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:26:06+00:00 2026-05-24T16:26:06+00:00

I have a table of 1 column and say 5 rows. The (data in

  • 0

I have a table of 1 column and say 5 rows.

The (data in the) rows are displayed one bellow another (vertically) in the table by default.

I want to display these data (in the table) in a horizontal alignment using CSS and / or javascript. (table of column 1 and rows 5 must remain the same)

  • 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-05-24T16:26:08+00:00Added an answer on May 24, 2026 at 4:26 pm

    This is your example table right?

    http://jsfiddle.net/hobobne/h8AZJ/

    <table>
        <tr><td>1</td></tr>
        <tr><td>2</td></tr>
        <tr><td>3</td></tr>
        <tr><td>4</td></tr>
        <tr><td>5</td></tr>
    </table>
    

    And you want them to be horizontally?

    http://jsfiddle.net/hobobne/h8AZJ/1/

    <table>
        <tr>
            <td>1</td>
            <td>2</td>
            <td>3</td>
            <td>4</td>
            <td>5</td>
        </tr>
    </table>
    

    But if you must use <tr>‘s and cant change the structure, then using display: inline-block; is not the best solution. First of all, you need special fix for ie7, when using inline-block and also it will leave spaces.

    http://jsfiddle.net/hobobne/h8AZJ/4/

    tr {display: inline-block;}
    

    Using float: left; is your best bet, as far as browser compatibility goes. Also leaves no spaces, but you must put <br style="clear: both;" /> after </table>.

    http://jsfiddle.net/hobobne/h8AZJ/5/

    tr {float: left;}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a data.table and I want to select all the rows
I have a set of ids in a table (column id), lets say from
Lets say I have a table in MySQL called articles, that has a column
I have two tables with similar columns - let's say table A with column
Say I have a mysql table, and I have a column of type enum
I have many tables, say T1, T2, T3. Every table has a column named
In SQL Server, I have a table where a column A stores some data.
Does anyone know a way to have all the rows of one column of
I have done fastload for table which has more than one column (I did
Okay, so let's say I have a mysql database table with two columns, one

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.