html attributes not woking in the view

Hi all:

 I want display a "table" in the view, but the result is not what I want. Anything wrong?

protected/views/site/index




<?php $this->pageTitle=Yii::app()->name; ?>

<table border="1">

    <tr bgcolor="#dceeff">

        <td width="50%" align="center">test1: </td>

        <td width="50%" align="center">test2: </td>    

    </tr>

</table>



but the result is not align center:

2172

demo.PNG

td doesn’t have an align property.

I guess you can use text-align, maybe.

Look it up at CSS Schools website. :)

Hi jacmoe, I do not familiar with html , but td has align propery right?

http://w3schools.com/tags/tag_td.asp

in html5 align is obsolete.

That’s it!! it works with




<th width="10%" style="text-align:right">



thanks