Hi I have a piece of php code,
which generates some results from mysql and adds them to a two column table which works fine. I have then added the following css class to the column.
td.manu {
background: url("../images/manu_button.fw.png") no-repeat;
height: 87px;
width:478;
font-size:48px;
font-family:Arial,
Helvetica, sans-serif;
color:#309;}
Now if the results are returned and there are two columns of data the tables fit perfectly however if it returns one column the text is in the middle of the page:
Please see the links below:
http://www.qrrw.net/R – this shows one column
http://www.qrrw.net/p – shows two coulmns
Any advice would be appreciated
Thanks
At present, your table is in a
<div>defined asThe
alignattribute is deprecated – you should not use it anymore.Add the following styles to that
div, i.e.:That will give you a result similar to what you had with both columns in place. You may have to increase the margin to obtain the desired effect.
Note: this is a band-aid solution… If you don’t want to change your styles too much – add some logic to detect the situation where you have only one column, and insert empty
<td>in your result to compensate for the missing cells. This way your output should still follow the styling you want.