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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:31:25+00:00 2026-05-23T17:31:25+00:00

I need a table layout for a webpage, but since someone decided that we

  • 0

I need a table layout for a webpage, but since someone decided that we should no longer use <table>s to do it, I’m looking to do it with <div>‘s.

As far as I know, the standard way to do this is to apply float: left to subsequent <div>s that are supposed to fit on the same row. This tends to break the layout if I’m trying to center the page.

Is there a good way to create a table-based <div> layout without relying on floats? I long for the good old days when I could get a table-based layout done in three minutes using just <table>, <tr> and <td>.

  • 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-23T17:31:26+00:00Added an answer on May 23, 2026 at 5:31 pm

    This gives you an idea of what can be done:

    <div id="wrapper">
    
        <div id="logo">
        </div>
    
        <div id="contact">
        </div>
    
        <br class="clear" />
    
        <div class="another">
        </div>
    
        <div class="another">
        </div>
    
    </div>
    

    CSS

    #wrapper {width:600px; margin:0 auto; border:1px solid #000;} 
      // wrapper is a containing div.  margin 0 auto centers it
    
    #logo {margin:0; padding:0; float:left; width:196px; 
        border:1px solid green; height:50px;}
      //get rid of the paddings and margin (same below)
      //as with #contact below, width adds up to 600px -4px for 1px border 
      //on each side 
    
    #contact {margin:0; padding:0; float:left; width:400px; 
        border:1px solid red; height:50px;}
    
    .another {height:100px; border:1px solid blue;}
    
    .clear {clear:both;}
      //used to get content right after floated bits.
    

    http://jsfiddle.net/jasongennaro/p4LpT/1/

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

Sidebar

Related Questions

I have an html/css page that is supposed to use an html table layout
I need ideas on how to go about table layout problem. I want to
I'm in need of some basic TSQL help. Here's my table layout: Orders Table
I need a table that stores key-value pairs, so I created one with a
I know that table sources need a data source to hold the data that
In MySQL 5.0.75-0ubuntu10.2 I've got a fixed table layout like that: Table parent with
I've been given a table based layout to work on and I need to
in my app i need to design like the following image i use table
basically I'm building a custom scroll bar that has a table layout inside it.
Alright, so I have a table that I need to store in a database.

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.