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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:27:23+00:00 2026-05-27T21:27:23+00:00

I have a DIV which is a banner stretching 100% wide for the top

  • 0

I have a DIV which is a banner stretching 100% wide for the top 25px of the display. It fades into view on loading and can be removed by clicking the cross at the end and. It is set to slide out of view using JQuery. However, the contents don’t slide away with it, they just disappear. Do I need to attach the same jquery to the nested DIV as well to make sure they animate correctly?

Currently using this JQuery:

<script type="text/javascript">
/* The fade in script */
$(document).ready(function(){
$('#alert_top').delay(2000).fadeIn(300);
});
/* The fade out script */
$(function(){ 
$(".alert_topClose").click(function(){
    $("#alert_top").slideUp(300, function(){
        $(this).remove();
    });
});
});
</script>

Here is the accompanying HTML

<div id="alert_top">
<div class="alertcontainer">
    <div class="alertcontent alertstyle">Text</div>
    <div class="alertclose alertstyle"><a class="alert_topClose"><img src="cancel_cross_14x14_white.png" /></a></div>
</div>
</div>

http://jsfiddle.net/2J7qP/

  • 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-27T21:27:24+00:00Added an answer on May 27, 2026 at 9:27 pm

    There was small issues in CSS which you provided. I fixed them and test it in FireFox, IE, Chrome and Safari and it looks fine now:

    • New Update: http://jsfiddle.net/42qWt/

    I change your fixed size to be flexible depends on screen width and put your close div inside alert. I changed the order of close button div because I wanted to use float:right. Please let me know if you have any question regarding this 🙂

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

Sidebar

Related Questions

I have a progress div which absolute positions across the top of the web
I have a partial view which consists of a div with a benner that
I have a plugin which shows posts from a certain city: <div id='banner-root' style=height:
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
I have a div which contain lots of input[type=text] fields. I want to put
I have a div which contains 2 elements. First element is a span and
I have a DIV which I want to be removed when I click a

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.