Is It Possible To Extend A H2 Box In Css Depending On The Text Within It? November 25, 2024 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 JugaPlace Caption Within Border Of ImageDiv Adding Redirect And Background Image From Code Behind In Asp.netHow To Create A Pop-up Div On Mouse Over And Stay When Click Share You may like these postsText Over Image - ResponsiveChange Css Through Jquery After A Click On A DivPermanently Change A :root .css Variable With Javascript (getting Info For Variable Via Input)Using Flex-basis To Control The Number Of Items Displayed On The Line 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?"