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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:43:04+00:00 2026-06-13T19:43:04+00:00

I need to expand and collapse button in my application. IE and chrome are

  • 0

I need to expand and collapse button in my application.

IE and chrome are supported, but mozilla firefox is displaying the image with small blank spaces in the two sides.

Its not set correctly, my code is as below.

<div class="searchdiv">
    <b class="searchlabel">Advanced Search</b>
    <input type="button" class="Expand_button" onclick="javascript: Expand();"/>
</div>

and the css is,

.Expand_button {
    margin-right: 5px;
    cursor: pointer;
    padding-bottom: 10px;
    padding-top: 5px;    
    background: #fff url('../images/Expand.jpg') no-repeat center ;
    height:1px;
}
  • 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-13T19:43:05+00:00Added an answer on June 13, 2026 at 7:43 pm

    First, inline Javascript is bad. That is what’s known as “intrusive Javascript”. Instead, write your Javascript so that it reacts to an action, and keep it in a separate Javascript file (jQuery-flavored to be concise):

    $(document).ready(function(){
        $('input.Expand_button').click(function(){
          Expand();
        });
    })
    

    You then remove the onclick call in your element, like so:

    <input type="button" class="Expand_button" />
    

    That said, are you trying to make the input invisible by setting height: 1px? If so, then that’s your problem. It still exists, and is still visible. Even more, you have padding and margins on it, so of course it’s still going to show up.

    What you want is display: none; or visibility: hidden, depending on the exact behavior you’re looking for. display: none; will take the item out of the DOM tree entirely, and other elements will shift accordingly. visibility: hidden; will just make the element invisible, without changing the DOM tree.

    If you use a library, such as jQuery, then you’ll be better off using display: none;, because then you can use jQuery’s built-in hide/show functions, which change display accordingly. If you don’t, then you’re writing your own behavior reactions, anyway, so you can use whichever you want.

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

Sidebar

Related Questions

I need a tree menu. But instead of a listview where you expand/collapse i
I need to add some accordian style expand/collapse handles to a series of parent
Can somebody help me in implementing Expand/Collapse functionality? On clicking the Expand button, I
How to expand/collapse a WPF Expander in code? I need to do it in
I have a RadGrid displaying a hierarchical structure. I want to save the expand/collapse
I'm looking for a way to move the expand/collapse button that appears when you
I need to expand an error message. I am running a Cucumber test on
im using expanded listview in my project, i need to expand the listview only
I need to be able to programatically expand users' search expressions such as: X
What I am trying to do is expand and collapse the middle of my

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.