logo
Tags down

shadow

bootstrap td vertical align top


By : Tara Meglan
Date : May 04 2020, 07:47 AM

show text in vertical align top with label in bootstrap td table cell the label text should be displayed in wrap

<td>
  <span>16/12/2018 00:00:00</span>
  <p class="label label-danger" style="width:100px;line-height:normal;word-wrap:break-word;white-space: normal;">Some long text here like abcd smnopqurst xyz</p>
</td>

enter image description here

Answer :

the label label-danger not available in bootstrap 4, use instead of badge badge-danger

td by default vertical-align is a baseline, so set vertical-align top

Add class badge badge-danger mb-0 for P

<td>
  <span>16/12/2018 00:00:00</span>
  <p class="badge badge-danger mb-0" style="width:100px;line-height:normal;word-wrap:break-word;white-space: normal;">Some long text here like abcd smnopqurst xyz</p>
</td>

https://jsfiddle.net/lalji1051/7j89ze6f/8/

CSS

td{
  vertical-align:top;
}
td p.badge{
  vertical-align:top;
  display:inline-block;
}


Share : facebook icon twitter icon
Related Posts Related Posts :
  • clear array after form submit
  • pass url variable to javascript
  • access data using api
  • div position fixed css
  • add horizontal line between two div
  • disable toggle button css
  • css fixed line height
  • background image not working
  • table cell border
  • text line break css
  • overlay div on div
  • text direction rtl css
  • javascript convert string to an object
  • bind inner div click to outer div
  • jquery ajax oncomplete
  • how to use promise in for loop
  • jquery get element using variable
  • javascript send textbox value
  • pass div class content to another class or id
  • css new line after element
  • css calc not working properly
  • link disabled jquery
  • sql join table to subquery
  • MS Access SQL Issue with OR AND Operators
  • set textarea value using php
  • php merge two arrays into one
  • php form with google captcha
  • update current row in php
  • php date format mysql
  • mysql pdo select query
  • php function return an array
  • PHP mysqldump database to sql file
  • display image query
  • php create array using foreach loop
  • associative array php
  • group_concat in mysql laravel
  • php array_push empty
  • mysql on update cascade not working
  • pdo insert prepared statement
  • mysql insert ignore vs on duplicate key
  • mysql insert into existing row
  • mysql multi insert query
  • mysql group by show all rows
  • php change profile image
  • combine multiple arrays into one array php
  • how to sum values in an array
  • how to get sum of the total time
  • How to Create Facebook live stream without notification using API ?
  • on button click make div visible
  • css affect another element on hover
  • shadow
    Privacy Policy - Terms - Contact Us © bighow.org