I noticed this on both Chrome and Firefox. I have a CSS arrow that I put in my table's header column. However, at small screen widths the arrow goes to the next line despite the display:inline-block
How do I keep the arrow on the same line, even at small screen widths?
.arrow-up:after { content: ""; display: inline-block; vertical-align: middle; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 10px solid #f00; }
<table> <tr class="headerRow"> <th class="headerRow arrow-up"> Header </th> </tr> </table>
Try adding white-space: nowrap;
to the .headerRow
class.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.