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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:40:53+00:00 2026-06-16T14:40:53+00:00

I want to create a CSS based popup (CSS3 Allowed) without any JavaScript, with

  • 0

I want to create a CSS based popup (CSS3 Allowed) without any JavaScript, with a fade transition and scale effect. Something similar to IceCream Sandwitch and JellyBean popup messages.

I have tried the following:
http://jsfiddle.net/OMS_/7UaK4/5/

Main Parts of Code:

HTML

<span class="info"> Info </span>
<div class="message">
    <p>
        Content
    </p>
</div>​  

CSS

.message {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    -webkit-transform: scale(.9, .9);
    -webkit-transition: all .18s ease-in-out;
}
.info:hover + .message {
    opacity: 1;
    -webkit-transform: scale(1, 1);
}

What I am doing is setting the opacity of the element to 0, and on hover of a sibling DOM element, transtion it to 1.
How do I position it in center, both vertically and horizontally?
Also, is this the proper way to make a CSS3 popup?
Can I transition from display: none to display: block ?

Thanks

  • 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-16T14:40:54+00:00Added an answer on June 16, 2026 at 2:40 pm

    How do I position it in center, both vertically and horizontally?

    Essentially, you would push the popup 50% from the top and left. However, you must go backwards a bit, since you must take into account the width and height of the popup.

    .center-of-screen {
        position: absolute;
        top: 50%;     margin-top:  /* -(height/2) */;
        left: 50%;    margin-left: /* -(width/2) */;
    }
    

    Source: How to center an object exactly in the center?

    Note: -(height/2) and -(width/2) are negative values of half of element’s width and height. E.g. if your element is 300px x 200px code is:

    .center-of-screen {
        position: absolute;
        top: 50%;     margin-top:  -100px;
        left: 50%;    margin-left: -150px;
    }
    

    Also, is this the proper way to make a CSS3 popup?

    Yes, if you are talking about a hover popup.


    Can I transition from display: none to display: block ?

    No. You would go from display: none to display: block with transition only on opacity.

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

Sidebar

Related Questions

I want something like this: http://img257.imageshack.us/img257/5906/globalcolleage.png I know how to create CSS-image-based bullets, but
I trying to create an HTML/CSS/JavaScript based list manager. I'm using text input fields
I want to create a non-stop spinning square using html and css. I currently
I want to create a server and I want to get the script, CSS
I'm trying to create a run time css-based swf which DOES NOT have embedded
I'm creating PHP, Javascript based photo-gallery from scratch The problem is, I want to
I want to create a tag cloud based on tags I assign to products.
I am trying to create a Javascript/Jquery based application that will eventually go into
I'm using PHP to create user-agent based dynamic stylesheets with: AddHandler application/x-httpd-php .css And
I'm trying to create a simple modal popup. I have the CSS done, and

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.