I’ve got a div that has a large width but a small amount of text. When I select up to the end of the text, the selection goes off to the end of the div. Is there any way I can prevent that from happening?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
try adding
width:auto;this will make your div wide equal to your text inside thatdiv. But if you must have thatdivwith large width try wrapping the text inside anotherdivorspanorpor anything you like and then giving itwidth:auto;.