0

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

2
Contributors
6
Replies
17
Views
3 Years
Discussion Span
Last Post by albucurus
0

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>';
 }
0

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.

0

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.

0

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;   
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.