angel777 Posted July 21, 2008 Share Posted July 21, 2008 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 https://forums.phpfreaks.com/topic/115805-maintain-the-button-and-textbox-in-the-orignial-location/ Share on other sites More sharing options...
haku Posted July 21, 2008 Share Posted July 21, 2008 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 https://forums.phpfreaks.com/topic/115805-maintain-the-button-and-textbox-in-the-orignial-location/#findComment-595586 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.