im learning css and not very good at it at the moment. Is there a way to scale the border width depending on the text width as a user could input a short name or a long one. This is the CSS of the border. Thanks for any help in advance.
#summonerInfo{
border:2px solid black;
margin-left: 25%;
width: 50%;
}
CodePudding user response:
set width to auto; width:auto; it will try to keep the contents inside the allocated box.