LeonLatex Posted September 12, 2022 Share Posted September 12, 2022 I can't figure it out, and I can't find the answer. I thought it was an easy thing, like a walk in the park or cycling to the pub. I want to decide for myself how wide the <label> should be. What am I doing wrong? <label style="width: 200px;">Fornavn</label> Quote Link to comment Share on other sites More sharing options...
kicken Posted September 12, 2022 Share Posted September 12, 2022 (edited) <label> is an inline element. Inline elements don't have a specific width, they just take up whatever space is necessary. If you want to assign a width them, you need to change the display to either block or inline-block. Edited September 12, 2022 by kicken Quote Link to comment Share on other sites More sharing options...
LeonLatex Posted September 12, 2022 Author Share Posted September 12, 2022 Ok. Thanks 😃 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.