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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:27:18+00:00 2026-06-06T12:27:18+00:00

This is the CSS for the header DIV: #header { display: block; float: left;

  • 0

This is the CSS for the header DIV:

#header { 
  display: block;
  float: left;
  min-width: 100%;
  min-height: 170px;
  height: auto; 
  background-color: #030309; 
  background-color: #191718; 
  position:fixed; 
  margin-top: -210px; 
  z-index: 999999; 
  opacity:.76;
  -webkit-transition: opacity 1s ease-in-out;
  -moz-transition: opacity 1s ease-in-out;
  -o-transition: opacity 1s ease-in-out;
  -ms-transition: opacity 1s ease-in-out;
  transition: opacity 1s ease-in-out;
  top: 0;
}

and this is for the hover state:

#header:hover { 
  display:block; 
  opacity:1;
  -webkit-transition: opacity 1s ease-in-out;
  -moz-transition: opacity 1s ease-in-out;
  -o-transition: opacity 1s ease-in-out;
  -ms-transition: opacity 1s ease-in-out;   
  transition: opacity 1s ease-in-out;
}

What I want to make it so the header is hidden by default and appears when it’s hovered. I’ve tried to add display: none on #header and display:block; on #header:hover but it’s not working.
I’ve tried also with opacity:0; on #header and opacity:1; on #header:hover but it’s not ok because the content beneath the header remains fixed and it’s not visible from top of the page.

Some suggestions?

  • 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-06T12:27:20+00:00Added an answer on June 6, 2026 at 12:27 pm

    First you have a margin-top:-210px that is causing the header to be not visible but you’re never moving it down to 0 on hover. Take that out. Then you can just set the opacity to 0 normally and 1 on hover and it’ll fade it in on hover.

    DEMO

    Alternatively, if you want it to slide down, change the transition from just opacity to all and set a top:0 in the :hover state. You also need to set a height that is greater than the negative top margin so part of the element will be visible so the user can hover over it. I set it to 220px.

    Relevant changes in CSS:

    #header {
        top:-210px;
        height: 220px;
        -webkit-transition:all 1s ease-in-out;
        -moz-transition:all 1s ease-in-out;
        -o-transition:all 1s ease-in-out;
        -ms-transition:all 1s ease-in-out;
        transition:all 1s ease-in-out;
    }
    
    #header:hover {
        opacity:1;
        top:0px;
        -webkit-transition:all 1s ease-in-out;
        -moz-transition:all 1s ease-in-out;
        -o-transition:all 1s ease-in-out;
        -ms-transition:all 1s ease-in-out;
        transition:all 1s ease-in-out;
    }​
    

    DEMO

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

Sidebar

Related Questions

I have a CSS entry that looks like this: .header { background-image: url(./images/embouchure.jpg); background-repeat:
Is this CSS for sizing an <img> to 100% height and maintaining the ratio
I have the following html and css <div id=header> <div id=headerTopLeft> <div id=areaSelect style=display:
How do I modify this CSS to apply a scroll bar with fixed header?
Given this CSS body { font-size: 62.5%; font-family: Arial,sans-serif; line-height: 2em; color:#333 } .post_text
i have this css code, and i want to shorten it. #one{ background: #6cab26;
I have this CSS. the property FILTER In class .crumb make my background and
I have this html configuration: <div id=Header> <div id=Stamp> <img alt=Header Stamp src=images/About-Us.png />
In .manager-record-header and .manager-record I've added property display: block; , I expect it to
Here is my css and html #header { position: absolute; left: 0; right: 0;

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.