Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding textarea to wrap
Message
 
To
24/04/2019 17:32:09
General information
Forum:
CSS
Category:
Troubleshooting
Miscellaneous
Thread ID:
01668273
Message ID:
01668297
Views:
53
`inline-block` will not stretch 100%. `block` automatically stretches across the entire width.

IOW, a `` only takes up as much space as it uses. A `
` stretches across the screen. `` is `inline` but `inline-block` behaves like inline in sizing but has marigins and flow characteristics of block.

So if you want full stretching don't make the div inline block.

+++ Rick ---

>I have this code:
>
>
><style>
>.DivWrapperLabel
>{
>   display: inline-block;
>   text-align: right;
>   width: 300px;
>   vertical-align: top;
>}
>.DivWrapperItem
>{
>   display: inline-block;
>   width: 100%;
>}
></style>
>
><div>
><div class="DivWrapperLabel">Title:</div>
><div class="DivWrapperItem"><textarea style="height: 200px; width: 100%;"></textarea></div>
></div>
>
>
>If you try that, you will see that the textarea is wrapping. I would like to avoid that. If I remove the width 100% in the DivWrapperItem style, it doesn't wrap. However, it will no longer fill the maximum area of the browser.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform