Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu Control - Issue with adding Textbox with StaticItemTemplate

Status
Not open for further replies.

nikdiva

Programmer
Jul 27, 2001
17
US
I added a textbox and button control to my menu control that is being populated with item from my database. I can't figure out why there is extra space being added to the top of that part of the menu. Can anyone help with this one? I've attached a link to a screenshot of the menu.

open


Nikki Wright
 
this is a CSS issue not an ASP.NET issue.
You'd be better off posting here: forum215

Also, look into using FireFox and install the FireBug plug in. With that, you can view the HTML,CSS, js ...etc of the page
 
Thanks, that put me on the right path....

I fixed it by making putting the textbox and button control within it's own list item and adjusting the <li> spacing in the stylesheet.

<StaticItemTemplate>
<asp:Label ID="lblItem" runat="server" Text='<%# Eval("Text") %>' />
<%-- Display textbox only for the Search Menu item --%>
<li><asp:TextBox ID="txtSearch" runat="server" Visible='<%# (Eval("Text") = "Search")%>' />
<asp:Button ID="btnSearch" Width="20px" Visible='<%# (Eval("Text") = "Search")%>' runat="server"/></li>
</StaticItemTemplate>



Nikki Wright
 
Cool, glad you got it. Firebug is an very helpful tool. I use it extensively
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top