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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:37:00+00:00 2026-06-15T21:37:00+00:00

I have icon, which on click adds new div’s (columns) to div container. The

  • 0

I have icon, which on click adds new div’s (columns) to div container. The problem is that when new div’s (columns) appears the button doesn’t shift right. Is it possible to somehow add position:fixed only inside the div?

Here is a few screens of what I have

enter image description here

enter image description here

And some code

    <div id="grid">
        <div id="add-col"></div>
        <div class="clear"></div>
        <div id="squares"></div>
    </div>


#grid{
    width:710px; 
    height: 470px;
    border:1px dotted #dddddd;
    display: none; 
    margin: 5px auto;
    padding: 5px;
    text-align:center;
    overflow: auto;
}

#add-col{
    margin:5px;
    float:right;
    background-image: url(images/table-add-column-icon.png);
    width: 32px;
    height: 32px;
    cursor: pointer;
}
  • 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-15T21:37:01+00:00Added an answer on June 15, 2026 at 9:37 pm

    Your CSS would look like this :

    #grid{
        width:710px; 
        height: 470px;
        border:1px dotted #dddddd;
        display: none; 
        margin: 5px auto;
        padding: 5px;
        text-align:center;
        overflow: auto;
    
        position:relative; //added
    
    }
    
    #add-col{
        margin:5px;
    
        background-image: url(images/table-add-column-icon.png);
        width: 32px;
        height: 32px;
        cursor: pointer;
    
        position:absolute; //added
        top:5px; //added
        right:5px; //added
    
    }
    

    With position absolute you can place a button in a corner without having it to move from that position ever again.

    To use a position you need to place position:relative; to its parent, else it will fly around the page.

    Note: float has been deleted from #add-col

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

Sidebar

Related Questions

Basically what I have here is a button that adds a new list item
I created a Button,While i Click that Button a new Dialog Box is Displayed.In
I have this table which contains Events, and on a click on its icon
I have the following script which is partially working. HTML: <div class=navigation3> click me
I currently have a button, which has an icon/image on it. I have configured
I have a 'div' container 'obj_image' having another 'div' 'like_icon' which if the user
I have a click once app that uses SQL CE 3.5, which is set
I'm creating an about JFrame for my program. I have an icon which I
how facebook show textarea which does not have icon for draging at the bottom-right
I have a <input /> field and an <a><img /></a> icon which I want

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.