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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:59:53+00:00 2026-06-07T05:59:53+00:00

I’ve got two pages, one made with div ‘s and CSS, one made with

  • 0

I’ve got two pages, one made with div‘s and CSS, one made with the notorious table.

The CSS Page…

…and the Table page.

At first glance, they’re pretty similar. Both sport a 2×2 grid of rounded “buttons”, which resize based on the window around them.

Now, put this in the context of a mobile phone. That’s right, shrink that result-frame down (horizontally, don’t worry about vertical).

Originally, i just had the CSS version, but there’s specific browser widths in which text on the left drops down to two lines where text on the right stays at one, as the strings are different lengths. It just so happens that with the actual strings, most phone resolutions cause this annoying situation to occur.

However, the table predictably acts the way I would want it to. The table has a concept of “rows” as well as “columns”, so the columns stay aligned and as a cell in one row gets taller, so do all the rest.

Is there a way to mimic this behavior in CSS? I’m constantly told how bad tables are for accessibility, etc. And I’m a fan of keeping <table> for actual tables of data, not layout.

I know of the adjacent-selector, but I couldn’t find a way to say “make your min-height the same as my height, and vice-versa”.

Also, obviously this could be done with a script. But unless someone here has a passionately feels that for this problem, javascript > CSS && javascript > Table, let’s stick to CSS.

  • 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-07T05:59:55+00:00Added an answer on June 7, 2026 at 5:59 am

    Every sane browser today should support the display: table/table-row/table-cell/... property, which converts your divs to a nice table, but without touching the html markup.

    Here is your transformed code:

    http://jsfiddle.net/eU6Xe/5/

    HTML:

    <div id="main">
        <div class="row">
            <div class="button">
                Some text here
            </div>
    
            <div class="button">
                And more text here
            </div>
        </div>
    
        <div class="row">
            <div class="button">
                More Text
            </div>
    
            <div class="button">
                Lots of text here
            </div>
        </div>
    </div>
    

    ​CSS:

    div #main {
        display: table;
        width: 100%;
    }
    
    div.row {
        display: table-row;
    }
    
    div.button {
        display: table-cell;
    }
    
    ​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
i got an object with contents of html markup in it, for example: string

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.