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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:35:27+00:00 2026-06-17T15:35:27+00:00

I’ve done a lot of research for CSS tables and creating a rowspan-like effect

  • 0

I’ve done a lot of research for CSS tables and creating a rowspan-like effect with CSS alone, and while I know it’s possible, nothing I’ve found so far demonstrates how to acheive what I’m looking for. I just want to know if my particular configuration is possible with CSS alone without using traditional tables, or if it requires Javascript to achieve (which I’m hoping to avoid).

I want two columns: the left column with one row which spans the entire height of the table and whose content is vertically centered, and the right column with two rows — the top row would be short and vertically aligned to the top, and the bottom row would be long and have content that is vertically aligned to the center. The left column/row will have a great deal of content, stretching the rightmost column and making the centering of the second row in the right column possible.

I should also like to note that I’m not one of those who is irrationally fearful of using traditional tables, even though that’s what it may seem. My project calls for CSS tables for other reasons unfortunately.

Below is a link to an example using tables demonstrate what I’m looking to achieve, and the flawed CSS tables I’ve come up with so far. The key aspect is the vertical aligning of the two rows on the right column — currently the title is aligned to the top through Javascript, but I would like to know if there is a way to do it with CSS tables (and without using absolute positioning, as I want the height of the title to affect the row below it). The height of the content on the bottom row in the right column will be variable and undetermined.

The goal:

http://jsfiddle.net/VCGAK/4/

This is all I have come up with:

http://jsfiddle.net/5mvrg/

CSS:

#thetable {
    display:table;
    width:100%;
}
#tablerow {
    display:table-row;
}
#main-content {
    border:1px solid #000;
    width: 40%;
    left:0;
    position:relative;
    display: table-cell;
    vertical-align:middle;
    padding-right:25px;
    z-index:1000;
    text-align:center;
}
#titlediv {
    border:1px solid #000;
}
#main-sidebar {
    border:1px solid #000;
    width: 60%;
    vertical-align:middle;
    display: table-cell;
    height: 100%;
    position:relative;
    padding-right: 15px;
    margin:0px auto;
    z-index:1000;
}

HTML:

<div id="thetable">
    <div id="tablerow">
        <div id="main-content" <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
            <p>LALALALALA</p>
        </div>
        <div id="main-sidebar">
            <div id="titlediv">Title is currently aligned to top via Javascript</div>Lots o' Details
            <br>
            <hr>Lots o' Details
            <br>
            <hr>Lots o' Details
            <br>
            <hr>
        </div>
    </div>

While this answer was helpful to demonstrate how rowspans can be achieved, I couldn’t tailor it to make this type of vertical aligning work. Any help would be greatly appreciated.

  • 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-17T15:35:28+00:00Added an answer on June 17, 2026 at 3:35 pm

    Ok, understood now:

    HTML CODE:

    <div id="thetable">
        <div id="tablerow">
            <div id="main-content" <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
                <p>LALALALALA</p>
            </div>
            <div id="main-sidebar">
                <div id="titlediv">Title is currently aligned to top via Javascript</div>
                <div id="contentdiv">
                Lots o' Details
                <br>
                <hr>Lots o' Details
                <br>
                <hr>Lots o' Details
                <br>
                <hr>
                </div>
            </div>
        </div>
    

    CSS CODE:

    body, td, th {
        font-family: Verdana, Geneva, sans-serif;
        font-size: 24px;
    }
    body {
        background-color:#652739;
        color:#CCC;
    }
    #thetable {
        width:90%;
        max-width:1180px;
        min-width:750px;
        position:relative;
        margin:0px auto;
    }
    #thetable, #thetable tr td {
        border:1px solid #000;
    }
    #leftcell {
        width:40%;
        text-align:center;
    }
    #titlecell {
        padding-left:50px;
        width:60%;
        vertical-align:top;
        height:200px;
    }
    #detailscell {
        padding-left:80px;
        width:60%;
        padding-right:15px;
        vertical-align:middle;
        height:300px;
    }
    

    I update ur jsfiddle too…

    Hope that help.

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

Sidebar

Related Questions

I know there's a lot of other questions out there that deal with this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.

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.