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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:57:48+00:00 2026-05-25T18:57:48+00:00

When i have a div with position: absolute , and in it is another

  • 0

When i have a div with position: absolute, and in it is another div with position: absolute the inner div will position in the frame given through the outer (wrapper) div.
Now i want to create a class (css) called error_message that positions itself exactly in the center middle of the site, indifferent from where the it is called, so i need it to break out of every div wrapped around the error_message div.. how do i do this?

  • 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-25T18:57:49+00:00Added an answer on May 25, 2026 at 6:57 pm

    i had a similar problem with positioning a hoover-text centered below a floated image button list.

    for me the solution was using the “fixed” value for the “position” property

    position: fixed
    

    then you can position your error message from top left of the body again.
    i use another wrapper div to position all hoover texts center center.

    enter image description here

    found the solution here:

    CSS nested Div with position absolute?

    the code is not the code from the picture you see, the picture is just for illustration.

    stylesheet in less format (see http://lesscss.org/)

    <style>
        .button
        {
            float: left;
            position: relative;
    
            a
            {
                &:hover, &:focus
                {
                    .titlePos
                    {
                        .title
                        {
                            display: block;
                        }
                    }
                }
                .titlePos
                {
                    position: fixed;
                    top:50%;
                    left:50%;
                    width: 400px;
                    margin-left: -200px;
    
                    .title
                    {
                        position:relative;
                        display: none;
                        top: 130px;
                        text-align: center;
                    }
                }
            }
    </style>
    

    html:

    <div id="wrapper">
        <div id="content">
            <ul>
                <li>
                    <div class="button">
                        <a href="#" >
                            <div class="buttonImage">
                                <img />
                            </div>
                            <div class="titlePos">
                                <div class="title">Button Hoover Text1</div>
                            </div>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <a href="#" >
                            <div class="buttonImage">
                                <img />
                            </div>
                            <div class="titlePos">
                                <div class="title">Button Hoover Text2</div>
                            </div>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <a href="#" >
                            <div class="buttonImage">
                                <img />
                            </div>
                            <div class="titlePos">
                                <div class="title">Button Hoover Text3</div>
                            </div>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <a href="#" >
                            <div class="buttonImage">
                                <img />
                            </div>
                            <div class="titlePos">
                                <div class="title">Button Hoover Text4</div>
                            </div>
                        </a>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an IE6 absolute position div that I want to be full screen
i have a container div which is position:relative and the squares are position:absolute because
I have a Div layer like this ... <style type=text/css> <!-- #newImg { position:absolute;
I have a <div> element with position: absolute and z-index something big. I would
I have a problem about div position relative alignment. I want the second div
I have two divs, one inner and one outer, but the inner div is
I have a div inside another div. The outer div has a starting width
what i have is this: <style> #main{position:relative; width:600px; height: 600px;} #cover{position:absolute} #image{position:absolute} </style> <div
I have a div with float:right (no position property declared). This div has some
I have a container div with the following CSS: #container { position:relative; overflow:hidden; width:200px;

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.