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
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

<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

Avatar of andieje
andieje

ASKER

Hi, is there possibly an error in that as it didn't give a 2 column layout. thanks
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of andieje
andieje

ASKER

thanks
HTML
HTML

HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.

62K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo