Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1076503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:26:06+00:00 2026-05-16T21:26:06+00:00

I am using ASP.NET Ajax control toolkit v3.5 TabContainer control. Anytime I use the

  • 0

I am using ASP.NET Ajax control toolkit v3.5 TabContainer control. Anytime I use the style “float:left” my tab container “lets go” of the div’s it contains and all my content appears outside/disconnected from the tab control (there’s a black border around the tab area). Online, some people say setting “overflow:hidden” helps, but this doesn’t appear to work within the context of the TabContainer. Its all busted in FF and IE. Anybody know how to fix this?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TabControl.aspx.cs" Inherits="WebApplication1.TabControl" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"/>
        <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2">
            <asp:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1">
            <ContentTemplate>
            <div>I'm all nice and pretty inside the tab</div><div>Me too I'm pretty inside tab, but I fall to the nextline.</div>
            </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
            <ContentTemplate>
            <div style="float:left;">This is messed up on float</div><div style="float:left;">Watch as I fall onto the line</div>
            </ContentTemplate>
            </asp:TabPanel>
        </asp:TabContainer>
    </div>
    </form>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:26:07+00:00Added an answer on May 16, 2026 at 9:26 pm

    This one was a real pain. So, you can’t just add styling attributes to the TabContainer like “BorderStyle=0” because it just ignores them. Instead, have to specify a custom style class. Oh, and by the way this means you have to customize the entire Css style instead of overriding a single class!! Woot for good design!!

    The good news is that you can download the source code for AJAX Control Toolkit and look for “Tabs.css”. This is the “default style” for TabContainer. Or, just copy all this code:

    /* default layout */
    .ajax__tab_default .ajax__tab_header {white-space:nowrap;}
    .ajax__tab_default .ajax__tab_outer {display:-moz-inline-box;display:inline-block}
    .ajax__tab_default .ajax__tab_inner {display:-moz-inline-box;display:inline-block}
    .ajax__tab_default .ajax__tab_tab {margin-right:4px;overflow:hidden;text-align:center;cursor:pointer;display:-moz-inline-box;display:inline-block}
    
    /* xp theme */
    .ajax__tab_xp .ajax__tab_header {font-family:verdana,tahoma,helvetica;font-size:11px;background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-line.gif")%>) repeat-x bottom;}
    .ajax__tab_xp .ajax__tab_outer {padding-right:4px;background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-right.gif")%>) no-repeat right;height:21px;}
    .ajax__tab_xp .ajax__tab_inner {padding-left:3px;background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-left.gif")%>) no-repeat;}
    .ajax__tab_xp .ajax__tab_tab {height:13px;padding:4px;margin:0;background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab.gif")%>) repeat-x;}
    .ajax__tab_xp .ajax__tab_hover .ajax__tab_outer {background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-hover-right.gif")%>) no-repeat right;}
    .ajax__tab_xp .ajax__tab_hover .ajax__tab_inner {background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-hover-left.gif")%>) no-repeat;}
    .ajax__tab_xp .ajax__tab_hover .ajax__tab_tab {background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-hover.gif")%>) repeat-x;}
    .ajax__tab_xp .ajax__tab_active .ajax__tab_outer {background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-active-right.gif")%>) no-repeat right;}
    .ajax__tab_xp .ajax__tab_active .ajax__tab_inner {background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-active-left.gif")%>) no-repeat;}
    .ajax__tab_xp .ajax__tab_active .ajax__tab_tab {background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-active.gif")%>) repeat-x;}
    .ajax__tab_xp .ajax__tab_body {font-family:verdana,tahoma,helvetica;font-size:10pt;border:1px solid #999999;border-top:0;padding:8px;background-color:#ffffff;}
    
    /* scrolling */
    .ajax__scroll_horiz {overflow-x:scroll;}
    .ajax__scroll_vert {overflow-y:scroll;}
    .ajax__scroll_both {overflow:scroll}
    .ajax__scroll_auto {overflow:auto}
    

    Now that you have the original CSS styling, you need to update the CSS to remove the <%=WebResource junk and point it to your own images (I took the ones from the Ajax source code too. I searched the folder for a file called “tab-left.gif” and it pulled the folder containing all the images up.) You also need to change the “.ajax__tab_xp” to “.CustomTabStyle” or whatever name you specify as the CssClass attribute:

    /* default layout */
    .ajax__tab_default .ajax__tab_header {white-space:nowrap;}
    .ajax__tab_default .ajax__tab_outer {display:-moz-inline-box;display:inline-block}
    .ajax__tab_default .ajax__tab_inner {display:-moz-inline-box;display:inline-block}
    .ajax__tab_default .ajax__tab_tab {margin-right:4px;overflow:hidden;text-align:center;cursor:pointer;display:-moz-inline-box;display:inline-block}
    
    /* xp theme */
    .CustomTabStyle .ajax__tab_header {font-family:verdana,tahoma,helvetica;font-size:11px;background:url(<%=WebResource("AjaxControlToolkit.Tabs.tab-line.gif")%>) repeat-x bottom;}
    .CustomTabStyle .ajax__tab_outer {padding-right:4px;background:url('../images/Tabs/tab-right.gif') no-repeat right;height:21px;}
    .CustomTabStyle .ajax__tab_inner {padding-left:3px;background:url('../images/Tabs/tab-left.gif') no-repeat;}
    .CustomTabStyle .ajax__tab_tab {height:13px;padding:4px;margin:0;background:url('../images/Tabs/tab.gif') repeat-x;}
    .CustomTabStyle .ajax__tab_hover .ajax__tab_outer {background:url('../images/Tabs/tab-hover-right.gif') no-repeat right;}
    .CustomTabStyle .ajax__tab_hover .ajax__tab_inner {background:url('../images/Tabs/tab-hover-left.gif') no-repeat;}
    .CustomTabStyle .ajax__tab_hover .ajax__tab_tab {background:url('../images/Tabs/tab-hover.gif') repeat-x;}
    .CustomTabStyle .ajax__tab_active .ajax__tab_outer {background:url('../images/Tabs/tab-active-right.gif') no-repeat right;}
    .CustomTabStyle .ajax__tab_active .ajax__tab_inner {background:url('../images/Tabs/tab-active-left.gif') no-repeat;}
    .CustomTabStyle .ajax__tab_active .ajax__tab_tab {background:url('../images/Tabs/tab-active.gif') repeat-x;}
    .CustomTabStyle .ajax__tab_body {font-family:verdana,tahoma,helvetica;font-size:10pt;border:0px solid #999999;border-top:0;padding:8px;background-color:#ffffff;float:left;}
    
    /* scrolling */
    .ajax__scroll_horiz {overflow-x:scroll;}
    .ajax__scroll_vert {overflow-y:scroll;}
    .ajax__scroll_both {overflow:scroll}
    .ajax__scroll_auto {overflow:auto}
    

    I added “float:left” to “ajax__tab_body” and the float issue was gone, but it introduced an ugly gap between the tabs and the end of the content at the top. So I gave up on the border and set it to 0 pixels.

    Here’s the final asp.net

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TabControl.aspx.cs" Inherits="WebApplication1.TabControl" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <link href="css/Site.css" rel="stylesheet" type="text/css" />
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div style="float:inherit;">
        <asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server"/>
            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2" CssClass="CustomTabStyle">
                <asp:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1">
                <ContentTemplate>
                <div>I'm all nice and pretty inside the tab</div><div>Me too I'm pretty inside tab, but I fall to the nextline.</div>
                </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
                <ContentTemplate>
                <div style="width:100px;">This is messed up on float<div style="float:left;">Watch as I fall onto the line</div></div>
    
                </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </div>
        </form>
    </body>
    </html>
    

    Easy right? bleh…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the AutoComplete control from the ASP.NET AJAX Control Toolkit and I'm experiencing
Here's the specs: ASP.NET 3.5 using ASP.NET AJAX AJAX Control Toolkit jQuery 1.3.2 web
I'm using ASP.NET 3.5 web forms, ASP.NET AJAX and ASP.NET AJAX Control Toolkit. I
I am using the ASP.NET AJAX Control Toolkit. Within this toolkit, I am only
I've been using the ASP.NET Ajax Control Toolkit Slideshow extender and while it works,
I have an ASP.net page. That has an Ajax Toolkit Tab Control. That has
I'm using the ASP net Ajax toolkit and have a GridView within the UpdatePanel
I'm using the Ajax Control Toolkit with .NET in VS2008 to put a Rating
I am using ASP.NET ajax to dynamically add/remove controls from a page without using
Using the client-side ASP.NET AJAX library, I have created an instance of a client

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.