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 4238494
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:54:44+00:00 2026-05-21T02:54:44+00:00

I am building a website and have a content area with boxes in to

  • 0

I am building a website and have a content area with boxes in to display company services. In my nav bar I have a button called “Contact”. Once Contacted has been clicked the content area is hidden and the contact div is shown. This works in Chrome and FF, but IE it’s a big mess up. Below is some code.

HTML code for the Contact area:

<div class="contact"> 
                    <h2>Contact Us</h2> 
                    <p>For emergencies or to arrange a quote, call <span style="font-weight:bold; color:red;">999</span>. Or use the form below and we'll get back to you shortly.</p> 
                    <form class="tab"> 
                    <label for="move">Your Name:</label> 
                    <input type="text" name="move"  class="move" /><br /> 
                    <label for="locate">Your Email:</label> 
                    <input type="text" name="locate" class="locate" /><br /> >  
                    <label for="contact">&nbsp;</label> 
                    <a href='#contact' class='contact-submit'>Send!</a><a href="#" class="prepend-1 contact-close">Cancel</a><br /> 
                    </form> 
                </div>

HTML Code for the Content area:

<div class="content"> 
                <div class="span-24 last"> 
                <p></p> 
                </div> 
                <div class="span-6 append-1"> 
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce viverra malesuada orci et lacinia. Ut ac augue diam. Fusce vitae felis velit, vitae vulputate libero. Pellentesque in nibh est, tincidunt ullamcorper dolor. Etiam condimentum semper sem a mollis. Cras faucibus, neque vitae egestas imperdiet, tellus lorem rutrum massa, eget ultrices libero purus quis mi. Aliquam erat volutpat. Donec non metus id sapien pulvinar consequat. Praesent ut lectus massa, id viverra orci. In hac habitasse platea dictumst.</p> 
                </div> <!-- END span-6 DIV --> 
                <div class="span-15 append-2 last prepend-bottom box2" style="overflow:hidden;"> 
                    <p>Cras viverra placerat luctus. Cras eu elit sit amet lectus pretium egestas id a est. Mauris pretium lacus non eros dapibus at tempus leo condimentum. Quisque a elit non massa mattis pretium vitae eu est. Curabitur vulputate iaculis tellus tincidunt bibendum. Aliquam erat volutpat. Aenean nec viverra augue. Duis ultrices velit sed sapien suscipit eget dictum dolor feugiat. Aliquam erat volutpat. Nulla cursus dolor ut turpis congue sollicitudin. In hac habitasse platea dictumst. Duis facilisis malesuada magna, sed porttitor tortor posuere sed.</p> 
                </div> <!-- END span-6 DIV --> 

                <div class="prepend-3 boxes prepend-top"> 

                    <div class="clearfix row"> 

                        <div class="module compact clearfix"> 
                          <h4><a href="electrical/">Electrical</a></h4> 
                          <div class="compact-content"> 

                            <img src="assets/images/electrical-image1.jpg" alt="" > 

                            <p>We also offer electrical installations and maintenance for both commercial and domestic.</p> 

                          </div> <!-- END compact-content DIV --> 
                        </div> <!-- END module DIV --> 
                        <div class="module compact clearfix"> 
                          <h4><a href="plumbing/">Plumbing</a></h4> 
                          <div class="compact-content"> 

                            <img src="assets/images/plumbing-image1.jpg" alt="Property Maintenance and Refurbishment" > 

                            <p>We offer plumbing for the commercial industry, no matter if it's big or a small job.<br /></p> 

                          </div> <!-- END compact-content DIV --> 
                        </div> <!-- END module DIV --> 

                        <div class="module compact clearfix"> 
                          <h4><a href="security/">Security</a></h4> 
                          <div class="compact-content"> 

                            <img src="assets/images/security-image1.jpg" alt="Security" > 

                            <p>Security is key, that's why we are experts in the security field.</p> 

                          </div> <!-- END compact-content DIV --> 
                        </div> <!-- END module DIV --> 
                    </div><!-- END clearfix row --> 
                </div><!-- END prepend-3 DIV --> 
            </div><!-- END content DIV --> 

jQuery Code:

$('a.contact-close').click(function(){//If cancel has been clicked, show original content.

    $('div.contact').hide('slow', function(){


            $('div.content').show('slow', function(){
                $('div.boxes').show('slow').delay(700);
            });//END div.content show-slow

        });
    });

        //Below is the contact script
        $('div.contact').hide();//Hide div

        $('div.nav a.contact').click(function(){//If Contact has been clicked show Contact div
            $('div.boxes').hide('slow', function(){
                $('div.content').hide('slow', function(){
                    $('div.contact').show('slow');

                });
            });//END Boxes hide
        });

And the CSS for this is on jsFiddle:
http://jsfiddle.net/hart1994/Nh9tP/

In Internet Explorer it jumps the boxes about whilst in the hiding process. Then when re-shown, it misplaces them in rows of two not three. See website link below for full demonstration.

You may need to rebuild this as it may not show in jsFiddle.

Or you can take a look at:
http://molossi.psm2.co.uk/

I have already tried changing the jQuery to slideDown/Up and fadeOut/In.

Thanks in advance!

  • 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-21T02:54:45+00:00Added an answer on May 21, 2026 at 2:54 am

    The jQuery hide() and show() methods “animate the width, height, and opacity of the matched elements simultaneously” so as the height and width change, the browser is re-flowing the document. Browsers do re-flow very differently and in IE this is making the boxes jump. You may want to use a custom jQuery animate() – perhaps just the height? It is the decreasing width that is causing the floated elements to re-flow.

    The broken layout after selecting the “Cancel” link is caused by jQuery leaving style on the <div class="boxes"> after the animation. This is causing the boxes div to not clear the paragraph on the left correctly and therefore have less width and therefore cannot fit 3 child elements on a row. You can remove these extra styles jQuery leaves by hooking into the callback on the final show() method like so:

    $('div.boxes').show('slow', function() {
        $(this).attr('style', '');
    }).delay(700);    
    

    Just to note also, that it probably doesn’t help that IE will be running in quirks mode. Your page does not have a doctype which in my experience can lead to unwanted and unexpected rendering issues (particularly in IE). Apart from the missing doctype there are a couple of other minor issues that are causing you page to not validate.

    Hope this is useful 🙂

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

Sidebar

Related Questions

I am building a website www.etutornetwork.com, in top menu I have included a link
I'm building a really simple CMS for a bilingual website. The website would have
So I have this website that I'm building and they are wanting to be
I have been using PHP and JavaScript for building my dad's website. He wants
I'm building a music events website and want to have a 'share this event'
I'm building an e-commerce website. I have a Product and Order models. It's possible
I'm building an ASP.Net MVC website. Rather than have everything in one project, I've
Hey. We're building a large ASP.NET website, and have hired an external firm to
I am building a small webapp for my website and have included tinyMCE as
I am building a Drupal website and want to have a facebook like box

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.