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
andiejeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
<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

0
andiejeAuthor Commented:
Hi, is there possibly an error in that as it didn't give a 2 column layout. thanks
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
yes there is an error... I had an id in the first div should be class

  <div class="tablerow">
   <div class="tablecol">
      <!-- table code -->
     this is col 1
   </div>
   <div class="tablecol">
      <!-- table code -->
     this is col 2
   </div>
</div>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
andiejeAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.