User7291
User7291

Reputation: 1115

word-wrap is not a known CSS property name

i'm trying to wrap a textbox but i'm getting that word-wrap is not a know css property name and it's not working so how can i fix it?

<asp:TemplateField HeaderText="cnt_content">
                <EditItemTemplate>
                    <asp:TextBox ID="cnt_content" runat="server" Text='<%# Bind("cnt_content") %>'  wrap="true" TextMode="MultiLine"></asp:TextBox>
                </EditItemTemplate> 
                <ItemTemplate> 
                    <asp:Label ID="cnt_content" runat="server" Text='<%# Bind("cnt_content") %>'></asp:Label> 
                </ItemTemplate> 
                <ItemStyle Width="800px" wrap="true" />
            </asp:TemplateField> 

note that my textbox is in a gridview and i'm working on asp.net using vb.net

Upvotes: 0

Views: 6183

Answers (4)

Sasidharan
Sasidharan

Reputation: 3740

  1. Go to options in Visual Studio
  2. Select Text-editor
  3. Select CSS
  4. Select Miscellaneous
  5. Under detect errors tick that as warning check box
  6. Now your error will become a warning in Visual Studio
  7. In browser you will get the result

Upvotes: 1

Jibran Khan
Jibran Khan

Reputation: 3256

Why not using asp.net's own TextBox WordWrap property.

<asp:TextBox Wrap="True|False" />

TextMode property to "Multiline"

Its working for me

enter image description here

Upvotes: 0

Pratik Patel
Pratik Patel

Reputation: 78

Don't worry, Visual Studio does not understand word-wrap property for Div.So it gives you green line.! So run your page & see output with <div style="word-wrap:break-word;">

Upvotes: 0

Vladimir
Vladimir

Reputation: 387

Correct way to using this is word-wrap: break-word;

Upvotes: 2

Related Questions