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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:10:07+00:00 2026-05-23T05:10:07+00:00

I want to set a div to zero height and width (or whatever it

  • 0

I want to set a div to zero height and width (or whatever it takes to get it invisible) so that the scale function in jQuery UI can scale the div up to 100% of the div’s size. I’ve tried the following:

HTML:

<div class="button1">
<a class="home link" href="index.html" onclick="blur();">Home</a>
</div>

CSS:

.button1
  {
   position:absolute;
   top:186px;
   left:5px;
   z-index:1
  }

.home
  {
   display: block;
   width: 127px;
   height: 79px;
   text-indent: -9999px;
   overflow: auto;
   background: url('/aaron.chauvin/sitepics/home.png') bottom;
  }

.home:hover
  {
   background-position: 0 0;
  }

a.link:focus
  {
   border: none;
   outline: 4px ridge #0000FF;
  }

a.link
  {
   border: none;
   outline: none;
  }

a.link:active
  {
   border: none;
   outline: none;
  }

a.link:hover
  {
   border: none;
   outline: none;
  }

JS:

// This doesn't work for setting the div to be invisible , but I couldn't
// find the right method that works correctly with .effect()
$('.button1').effect( "scale", { percent: 0 }, 10 );
$('.button1').effect( "scale", { percent: 100 }, 1500 );

This doesn’t work. I can’t even get the scale function to work properly on the div if it’s already visible (if I leave out the first line of js).

I really want to use scale() so that the div and it’s content seems to “grow” from nowhere on the page, but if there’s another means of achieving this (utilizing jQuery or jQuery UI), I’m open to suggestions. Also, is it possible to have an easing effect and/or animation with scale() (assuming I get it to work properly =P)?

Edit: I should also mention that I don’t want this scale effect to occur on click or hover or anything, just when the page loads & I want to delay it a bit.

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-23T05:10:08+00:00Added an answer on May 23, 2026 at 5:10 am

    The problem here is once the DIV is reduced to 0% of the original size, no matter what percentage you want it to scale to, it will always remain at 0% of the original size. How do you scale an element of size 0 to 200% of it’s current size?

    Try to reduce it to something other than 0%, say percent: 10 and then increase it by percent: 1000.

    OR

    Use .effect( "size", { to: { width: 50, height: 10 } }, 500 ); and then change it to whatever size you desire.

    OR

    se .animate({"height": "toggle", "width":"toggle"},500) and then use the same to bring it back to original size.

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

Sidebar

Related Questions

I want to set the width and height of the container <div> of <img>
I have a div that I want to set the height of to 1/2
I want to set a background image for a div, in a way that
If I want to set width of a div containing some text and I
i want to set the width of the DIV like ( 100% - 10px
I have a div with an id main, I want to set its height
I want to select a set of DIV elements that are contained inside a
I want to set height of a div as height of window when page
I want to set the height of a div based on CSS expression. Basically
I want to set an observer for each of the following checkboxes: <div id=listr>

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.