Post by joe_mm » Sun May 21, 2017 7:12 pm

Hi,

I'm trying to put some information in a table on my Delivery Information page. I'm trying to specify the width of the table to 200 pixels, but the table always appears across the entire width of the page. How can I control the width of the table? Here is the html code I've used:

Code: Select all

<table style="height: 200px;" border="1" width="200">
<tbody>
<tr style="height: 30px;">
<td style="width: 98px; height: 30px; text-align: center;">up to</td>
<td style="width: 100px; height: 30px; text-align: center;">Price</td>
</tr>
<tr style="height: 30px;">
<td style="width: 98px; height: 30px; text-align: center;">x&nbsp;kg</td>
<td style="width: 100px; height: 30px; text-align: center;">&pound;y</td>
</tr>
<tr style="height: 30px;">
<td style="width: 98px; height: 30px; text-align: center;">x&nbsp;kg</td>
<td style="width: 100px; height: 30px; text-align: center;">&pound;y</td>
</tr>
<tr style="height: 31px;">
<td style="width: 98px; height: 31px; text-align: center;">x&nbsp;kg</td>
<td style="width: 100px; height: 31px; text-align: center;">&pound;y</td>
</tr>
<tr style="height: 31px;">
<td style="width: 98px; height: 31px; text-align: center;">xkg&nbsp;</td>
<td style="width: 100px; height: 31px; text-align: center;">&pound;y</td>
</tr>
<tr style="height: 31px;">
<td style="width: 98px; height: 31px; text-align: center;">x&nbsp;kg</td>
<td style="width: 100px; height: 31px; text-align: center;">&pound;y</td>
</tr>
<tr style="height: 31px;">
<td style="width: 98px; height: 31px; text-align: center;">x&nbsp;kg</td>
<td style="width: 100px; height: 31px; text-align: center;">&pound;y</td>
</tr>
<tr style="height: 31px;">
<td style="width: 98px; height: 31px; text-align: center;">x&nbsp;kg</td>
<td style="width: 100px; height: 31px; text-align: center;">&pound;y</td>
</tr>
</tbody>
</table>

Newbie

Posts

Joined
Mon Dec 19, 2016 9:20 pm

Post by artcore » Sun May 21, 2017 8:23 pm

Assuming you're on OC2+
http://getbootstrap.com/css/#tables
That should get you started

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands
Who is online

Users browsing this forum: No registered users and 14 guests