Home Forums Porto Admin Template Table Column Width

This topic contains 1 reply, has 2 voices, and was last updated by  Support2 4 months ago. This post has been viewed 153 times

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10029025

    mjejun
    Participant

    Hi,

    I am currently working a table HTML. I noticed that whenever I have a long text in a <td></td>, the text didn’t break into a new line. Instead, it pushed the column width while squeezing other columns.

    I tried to fix it using .container, but the result is still the same. Please refer to this screenshot: https://snag.gy/YLQ2VX.jpg

    Please help.

    Thank You.


    #10029030

    Support2
    Keymaster

    Hello,

    You need define a width for the column:

    <table class="table table-responsive-md mb-0">
    	<thead>
    		<tr>
    			<th>#</th>
    			<th width="200">First Name</th>
    			<th>Last Name</th>
    			<th>Username</th>
    		</tr>
    	</thead>
    	<tbody>
    		<tr>
    			<td>1</td>
    			<td width="200">Mark</td>
    			<td>Otto</td>
    			<td>@mdo</td>
    		</tr>
    		<tr>
    			<td>2</td>
    			<td width="200"> Lorem ipusom dolor sit a met, dont dolor sit a met. Lorem ipusom dolor sit a met, dont dolor sit a met. Lorem ipusom dolor sit a met, dont dolor sit a met. </td>
    			<td>Thornton</td>
    			<td>@fat</td>
    		</tr>
    		<tr>
    			<td>3</td>
    			<td width="200">Larry</td>
    			<td>the Bird</td>
    			<td>@twitter</td>
    		</tr>
    	</tbody>
    </table>

    Please, try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


Viewing 2 posts - 1 through 2 (of 2 total)