Solved

Problems with tables in Jquery tabs

Posted on 2010-08-23
3
564 Views
Last Modified: 2012-05-10
Hi,

I have 3 tabs, the final tab needs to hold a table but whenever i try to insert it, the table simply falls below the tab and get's embeded into the page rather than in the tab. Can someone point to say what i'm doing wrong with a suitable correction?

My html/php/jquery knowledge is limited so please explain/fix in lamence terms for me. :)

Example can be found at http://74.53.102.167/~bookedy/tour.php?id=1

<ul class="tabs">

                          <li><a href="#tab1">Tour Details</a></li>

                <li><a href="#tab2">Itinerary</a></li>

	            <li><a href="#tab3">Dates, Prices & Book</a></li>

          </ul>

                        <div class="tab_container">

                            <div id="tab1" class="tab_content">

                              <p align="left"><span class="style1">Tour Overview </span><br />

                              <?php echo $row_tours['description']; ?></p>

            <p align="center"><img src="pictures/tablinebreak.jpg" alt="linebreak" width="400" height="5" /></p>

            <p align="left"><span class="style1">Highlights</span><br />

              <?php echo $row_tours['highlights']; ?></p>

            <p align="center"><img src="pictures/tablinebreak.jpg" alt="linebreak" width="400" height="5" /></p>

            <p align="left"><span class="style1">Optional Activities</span><br />

              <?php echo $row_tours['optionalextras']; ?></p>

			<p align="center"><img src="pictures/tablinebreak.jpg" alt="linebreak" width="400" height="5" /></p>

			   <p align="left"><b>Operated by</b> <p align="left"><img src="pictures/logos/trekamerica.jpg" alt="trekamerica" />

                </div>

                          <div id="tab2" class="tab_content">

                            <p align="left"><span class="style1">Tour Itinerary </span>

                              <?php do { ?> 

                              <p align="left"><strong>Day <?php echo $row_itinerary['day']; ?>- <?php echo $row_itinerary['location']; ?></strong><br />

                              <?php echo $row_itinerary['description']; ?>    

                              <p>

                              <?php } while ($row_itinerary = mysql_fetch_assoc($itinerary)); ?>

                          </div>

                          <div id="tab3" class="tab_content">

                            <p> <p> <p> <p align="left"><span class="style1"> Dates, Prices &amp; Book!    <p> 

							<table width="500">

                              <tr>

                                <td>Test 1</td>

                                <td>Test 2</td>

                                <td>Test 3</td>

                                <td>Test 4</td>

                              </tr>

                              <tr>

                                <td>Content 1</td>

                                <td>Content 2</td>

                                <td>Content 3</td>

                                <td>Content 4</td>

                              </tr>

                            </table>

							<p>

							  </span>

							  <br />

							  

					            </div>

                        </div>

Open in new window

0
Comment
Question by:bookedy
  • 2
3 Comments
 
LVL 15

Expert Comment

by:SRigney
ID: 33505038
I'd start with trying to simplify the html you have here.

I'm guessing on how you want this to end up, but there seems to be too many paragraphs, and not having the close tags may be part of what is causing a problem.
<div id="tab3" class="tab_content">

<p align="left"><span class="style1"> Dates, Prices &amp; Book!</span></p>

<table width="500">

<tr>

<td>Test 1</td>

<td>Test 2</td>

<td>Test 3</td>

<td>Test 4</td>

</tr>

<tr>

<td>Content 1</td>

<td>Content 2</td>

<td>Content 3</td>

<td>Content 4</td>

</tr>

</table>

</div>

Open in new window

0
 

Author Comment

by:bookedy
ID: 33505197
Hi,

I have copied your code as below but the table is still apearing under the frame. Any ideas?

Example at http://74.53.102.167/~bookedy/tour.php?id=1
<div id="tab3" class="tab_content">

<p align="left"><span class="style1"> Dates, Prices &amp; Book!</span></p>

<table width="500">

<tr>

<td>Test 1</td>

<td>Test 2</td>

<td>Test 3</td>

<td>Test 4</td>

</tr>

<tr>

<td>Content 1</td>

<td>Content 2</td>

<td>Content 3</td>

<td>Content 4</td>

</tr>

</table>

</div>

Open in new window

0
 
LVL 15

Accepted Solution

by:
SRigney earned 500 total points
ID: 33505487
I think that the problem is that you are missing tags in other locations.


                  <table width="500px" border="0" cellpadding="0" cellspacing="0">
                    <!--DWLayoutTable-->
                    <tr>  
                      <ul class="tabs">


There is not a <td> here.  the table that isn't working right is embeded here, so the tags may be getting mixed up.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Show confirmation alert in Jquery 14 43
alert before form submission 6 31
Change javascript css 1 20
Refresh div via ajax without lost ccs <li> styles 8 0
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now