0

Hi its me again =),
See the code below:

<style>
    td{
     width:150px;
     }
</style>
.
.
.

echo'<table>
    <tr>
        <td>TITLE</td>
     </tr>
</table>
.
.
.

Im trying to style the <td> width in css but php doesnt recognize it. I've also tried this <td style="width:150px">TITLE</td>.
Do you have any idea about this?

Thanks

OtepTheThird

3
Contributors
3
Replies
15
Views
2 Years
Discussion Span
Last Post by OtepTheThird
1

PHP is server side, styling is happening client side on the rendered HTML. In any event if you want to apply a fixed width to the table cell, try applying this style to the table element.

 table { table-layout:fixed; }
0

Both of those should work. Is your actual table different from this one? Because if you only have one row and one cell and no other styling how are you observing the width of the cell?

This question has already been answered. 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.