Jump to content

maintain the button and textbox in the orignial location


angel777

Recommended Posts

hi i wonder how do i solve my css problem.

when i try to minimize my internet browser' width to be smaller, the textbox and the button will be running out of the location. how do i maintain the button and textbox in the orignial location ?

 

my code is as below; but i wonder why when i drag the browser, those textbox and button are moving..

 

echo "<span class=\"section\" id=\"top_right2\">";                 
          echo "<button class='query_button' name='query' id='query' onclick='autoUpdate();'>Query</button>";   
           echo "<button class='top_button' name='edit_db' id='edit_db' style='border-style: outset' onclick='CrossClassEvent(CLASS_ID_HEADER,HEADER_EVENT_ID_EDIT_DB_CLICKED);'>Edit Database</button>";       
          
echo "</span>";

 

 

.section#top_right2 {
    position: relative;
    padding-top: 0em;
    padding-bottom: 0em;
    left: 2%;
    top:  -70%;
    _top: -40%
}

Link to comment
Share on other sites

You have "left: 2%" in your CSS. This means that the distance from the left of the screen is 2 percent of the width of the screen. If you make your browser smaller, then 2% becomes a smaller amount, so it shifts left.

 

Make the left value a static amount (px), and it should solve your problem.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.