handling whitespace in the asp.net menu

K

koldskaal

I have a asp.net menu in my project.

I want it to be possible to add menuitems with very long strings. At
the same time I dont want the menu to be wider than 200px. Therefore
the text in long strings must be displayed on multiple lines. This
seems to be something that the creators of the aspnet menu dont like,
because obviously in the HTML that is rendered every menu item has a
style like this:

<td style="white-space:nowrap;width:100%;">

I have tried to add this style to my stylesheet:

.celle
{
white-space:normal;
}

(and setting StaticMenuItemStyle CssClass="celle")

This behaves correctly in Firefox, but in IE7 everything after the
first line is invisible.


Does anyone know how to handle this?


Bjarke
 
B

bjar

I have a asp.net menu in my project.

I want it to be possible to add menuitems with very long strings. At
the same time I dont want the menu to be wider than 200px. Therefore
the text in long strings must be displayed on multiple lines. This
seems to be something that the creators of the aspnet menu dont like,
because obviously in the HTML that is rendered every menu item has a
style like this:

<td style="white-space:nowrap;width:100%;">

I have tried to add this style to my stylesheet:

  .celle
    {
        white-space:normal;
    }

(and setting StaticMenuItemStyle CssClass="celle")

This behaves correctly in Firefox, but in IE7 everything after the
first line is invisible.

Does anyone know how to handle this?

Bjarke

I found out immideately after posting this.


In the <asp:menu tag, add the attribute itemWrap="true"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top