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

  • SEARCH
  • Home
  • 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 8764113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:56:55+00:00 2026-06-13T15:56:55+00:00

I have a DIV which loads other DIVs on button clicks but the default

  • 0

I have a DIV which loads other DIVs on button clicks but the default DIV that is to be loaded is not registering its CSS with it. My CSS is quite long and a no. of elements inside “ProfileSettingsContainer” DIV is depending on it. How can I load this DIV on default with my CSS? Thanks.

        <script type="text/javascript">
            $(document).ready(function () {
                // Load default div into 'LeftPanelinfo' Div
                $("#leftpanelinfo").html($("#ProfileSettingsContainer").html());

                $(".settings").click(function () {
                    $("#leftpanelinfo").html($("." + $(this).attr('rel')).html());
                });


            });
        </script>

     <div id="ProfileSettingsContainer" style="padding: 15px; height:400px; width:400px;">
         <div style="clear:both">
                  <div style="float:left; width:40%">FirstName</div>
                  <div style="float:right; width:60%"><asp:TextBox ID="username" CssClass="FirstName" runat="server" /></div>
         </div>
         <div style="clear:both">
                  <div style="float:left; width:40%">Last Name</div>
                  <div style="float:right; width:60%"> <asp:TextBox ID="TextBox1" CssClass="LastName" runat="server" /></div>
         </div>
         <div style="clear:both">
                  <div style="float:left; width:40%">Birthdate</div>
                  <div style="float:right; width:60%">3</div>
         </div>
              <div style="clear:both">
                  <div style="float:left; width:40%">Location Zipcode</div>
                  <div style="float:right; width:60%">3</div>
         </div>
              <div style="clear:both">
                  <div style="float:left; width:40%">Biography</div>
                  <div style="float:right; width:60%">3</div>
         </div>
     </div>

CSS:

   #ProfileSettingsContainer:before
        {
            content: '';
            position: absolute;
            z-index: -1;
            border: 1px dashed #ccc;
            top: 5px;
            bottom: 5px;
            left: 5px;
            right: 5px;
            -moz-box-shadow: 0 0 0 1px #fff;
            -webkit-box-shadow: 0 0 0 1px #fff;
            box-shadow: 0 0 0 1px #fff;
        }

        h1
        {
            text-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0px 2px 0 rgba(0, 0, 0, .5);
            text-transform: uppercase;
            text-align: center;
            color: #666;
            margin: 0 0 30px 0;
            letter-spacing: 4px;
            font: normal 26px/1 Verdana, Helvetica;
            position: relative;
        }

        fieldset
        {
            border: 0;
            padding: 0;
            margin: 0;
        }

        #ProfileSettingsContainer input
        {
            padding: 15px 15px 15px 30px;
            margin: 0 0 10px 0;
            width: 250px; /* 353 + 2 + 45 = 400 */
            height: 4px;
            border: 1px solid #ccc;
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            border-radius: 5px;
            -moz-box-shadow: 0 1px 1px #ccc inset, 0 1px 0 #fff;
            -webkit-box-shadow: 0 1px 1px #ccc inset, 0 1px 0 #fff;
            box-shadow: 0 1px 1px #ccc inset, 0 1px 0 #fff;
        }

        #ProfileSettingsContainer input:focus
        {
            background-color: #fff;
            border-color: #e8c291;
            outline: none;
            -moz-box-shadow: 0 0 0 1px #e8c291 inset;
            -webkit-box-shadow: 0 0 0 1px #e8c291 inset;
            box-shadow: 0 0 0 1px #e8c291 inset;
        }

        /*--------------------*/
        #actions
        {
            margin: 25px 0 0 0;
        }

        .submit
        {
            background-color: #ffb94b;
            background-image: -webkit-gradient(linear, left top, left bottom, from(#fddb6f), to(#ffb94b));
            background-image: -webkit-linear-gradient(top, #fddb6f, #ffb94b);
            background-image: -moz-linear-gradient(top, #fddb6f, #ffb94b);
            background-image: -ms-linear-gradient(top, #fddb6f, #ffb94b);
            background-image: -o-linear-gradient(top, #fddb6f, #ffb94b);
            background-image: linear-gradient(top, #fddb6f, #ffb94b);
            -moz-border-radius: 3px;
            -webkit-border-radius: 3px;
            border-radius: 3px;
            text-shadow: 0 1px 0 rgba(255,255,255,0.5);
            -moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
            -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
            box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
            border-width: 1px;
            border-style: solid;
            border-color: #d69e31 #e3a037 #d5982d #e3a037;
            float: left;
            height: 35px;
            padding: 0;
            width: 120px;
            cursor: pointer;
            font: bold 15px Arial, Helvetica;
            color: #8f5a0a;
        }

        .submit:hover, .submit:focus
        {
            background-color: #fddb6f;
            background-image: -webkit-gradient(linear, left top, left bottom, from(#ffb94b), to(#fddb6f));
            background-image: -webkit-linear-gradient(top, #ffb94b, #fddb6f);
            background-image: -moz-linear-gradient(top, #ffb94b, #fddb6f);
            background-image: -ms-linear-gradient(top, #ffb94b, #fddb6f);
            background-image: -o-linear-gradient(top, #ffb94b, #fddb6f);
            background-image: linear-gradient(top, #ffb94b, #fddb6f);
        }

        .submit:active
        {
            outline: none;
            -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
            -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;
        }

        .submit::-moz-focus-inner
        {
            border: none;
        }
  • 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-06-13T15:56:56+00:00Added an answer on June 13, 2026 at 3:56 pm

    I believe it is because html() loads the contents of your div – not the div itself.

    So you could do something like

    <div id="loadOuterDiv">
        <div id="ProfileSettingsContainer" style="...">
            ...
        </div>
    </div>
    

    And then

    $("#leftpanelinfo").html($("#loadOuterDiv").html());
    

    Alternatively you could instead apply your #ProfileSettingsContainer CSS to #leftpanelinfo and leave your javascript the same.

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

Sidebar

Related Questions

I have a page which loads divs of rounded corners. And on each div
I have a div which get's its content loaded through ajax .load(ajaxcontent.php). Inside this
I have a little issue concerning an animation-effect which loads a certain div into
I have a slider-like widget which is basically, a div of sub-divs containing some
I have an index.php file that loads other php files via this javascript/ajax code:
I have an AJAX link that currently loads a partial view into a div.
I have div which has three buttons as, <div id=buttons> <input id=preview class=ButtonStyle type=submit
I have DIV element which only has a few lines in and a background
I have div class=contentBlock which is treated as the container for updating <div class=contentBlock></div>
I have div ( #child ) which won't expand to the full height of

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.