Avatar of andieje
andieje asked on

how to 2 tables side by side without putting them in another table

Hello

I'm not a css person so please excuse the basic question.

My website has a form which is in a table which has 2 columns. One of the form items is an accordion type thing which  expands when opens. This stretches the height of the table so that the items in the second column are pulled apart. This doesnt look very good so I was hoping to find a way around it.

My first though was to have to tables next to each other to represent the 2 columns of the original table. However I have no idea how to do this without using a table.

Please can you advise if this is possible or an alternative solution is also welcome

thanks
CSSHTML

Avatar of undefined
Last Comment
andieje

8/22/2022 - Mon
Scott Fell

<style>
.tablerow{width:800px;}
.tablecol{width:390px;float:left;padding:5px;}
</style>

<div class="tablerow">
   <div id="tablecol">
      <!-- table code -->
   </div>
   <div class="tablecol">
      <!-- table code -->
   </div>
</div>

Open in new window

ASKER
andieje

Hi, is there possibly an error in that as it didn't give a 2 column layout. thanks
ASKER CERTIFIED SOLUTION
Scott Fell

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
andieje

thanks
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck