I have been trying to move the table element.Can you please help me with it? I am doing the CSS in php.

 foreach ($_GET as $myid => $value)
        {

             echo '<div class="DVD ID">'; 
             echo "<table border='3' position='absolute' left='750px' bottom='350px';>";

             echo  "<td> " . $value .  "</td>";
             echo '</div>';


        }

Thank You

Recommended Answers

All 6 Replies

Not very clear for me your request.
Move the table where ? Do you want drag&drop ?

And... your code is not correct.
This is correct code

 foreach ($_GET as $myid => $value)
 {
     echo '<div class="DVD ID">'; 
     echo "<table border='3' position='absolute' left='750px' bottom='350px';>";
     echo  "<tr><td> " . $value .  "</td></tr>";
     echo "</table>";
     echo '</div>';
 }

Just positioning the table towards the right.

 echo "<table border='3' position='absolute' left='750px' bottom='350px';>";
    echo  "<tr><th> DVD ID<td> " . $myid .  "</td></th></tr>";
    echo  "<tr><th> DVD Name<td> " . $DVDname .  "</td></th></tr>";
    echo  "<tr><th> Quantity<td> " . $Qty .  "</td></th></tr>";
    echo  "<tr><th> Price<td> " . $price .  "</td></th></tr>";

This is my code now. I just want to move it to the right. I dont think its right. Thanks for your help anyways.

Ok, you want to put the cart in right of page, but what do you to do with the rest of page ?
What do you want to put in left part ?

I try to navigate little. If this page is only to show the cart content, put them on middle with horizontal records and a delete button at end of each record:

ID DVD Name Quantity Price
1 Skyfall 3 20 Delete
2 Superman 1 12.99 Delete

Delete may be an picture button, his scope is to allow user to delete from cart. Try to use Ajax to delete records from cart.

At end of page you can put buttons to confirm the cart and request delivery adress.

I just want to move the table to the left but I am not able to.

Your HTML must be like this:

<div id="cart">
     <h1> Cart </h1>
    <table id="cartcontent">
        <tbody>
            <tr>
                <th> DVD ID</th>
                <td> 3</td>
            </tr>
            <tr>
                <th> DVD Name</th>
                <td> Skyfall</td>
             </tr>
             <tr>
                 <th> Quantity</th>
                 <td> 3</td>
              </tr>
              <tr>
                  <th> Price</th>
                  <td> 40</td>
               </tr>
           </tbody>
     </table>
 </div>

How you see, i put id attribute to <div>
In your css file put this:

#cart
{
    border: 1px;
 /*this move your div to right*/
    float: right;   
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.