Is It Possible To Extend A H2 Box In Css Depending On The Text Within It? October 04, 2023 Post a Comment I have a header box appearing on a page. I am using h2 and configured this to show a border etc. My issue is that the longest text requires a box of 400px wide, whereas the shortesSolution 1: Try thisdiv{ float: left; width: auto; background-color: #777; } CopyDEMO Solution 2: yes you can apply float: left to H2Baca JugaCss Reserves An Unknown Space In Box ModelVertical Line Spacer Between Two DivsCan Not Stretch The Css Divs 100 % Vertically And Horizontally Share You may like these postsFixed Layout + Wide Content = Tables?Flexbox Layout Pattern 1/3How Do I Present A Tree In An Html Table?Css For All Other Browsers But Ie Post a Comment for "Is It Possible To Extend A H2 Box In Css Depending On The Text Within It?"
Post a Comment for "Is It Possible To Extend A H2 Box In Css Depending On The Text Within It?"