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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:45:26+00:00 2026-06-11T02:45:26+00:00

Consider the following HTML: <!DOCTYPE html> <html> <head> <title></title> </head> <body> <div style=border-style: solid;

  • 0

Consider the following HTML:

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
<div style="border-style: solid; border-width: thin; width:100%">
    <input type="button" style="width:20px;float:right;" value="a" />
    <div style="padding-right:35px;">
            <input type="text" style="width: 100%;" />
    </div>
</div>
</body>
</html>

This is the correct layout, and how it looks in IE 9 in normal mode. If you stretch the browser, the button remains on the right of the input box, and the input box stretches accordingly.

IE 9 Normal

This is how it looks in IE 9 in compatibility mode. As you can see, the input box jumps onto the next line:

IE 9 Compatibility Mode

So, is there a way to fix this, so that it works regardless of whether or not compatibility mode is set?

Obviously I’m looking for a solution with minimal hackiness 🙂

Thanks!

  • 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-11T02:45:27+00:00Added an answer on June 11, 2026 at 2:45 am

    Try this HTML:

    <div class="search"><input name="btn" type="button" value="a" /><span><input type="text" name="search_input" /></span></div>
    

    With this CSS:

    .search > span {
      display: block;
      overflow: hidden;
      padding-right: 10px;
    }
    .search input[type=text] {
      width: 100%;
    }
    .search input[type=button] {
      float: right;
    }
    

    Here’s a jsfiddle to test it out for yourself:

    http://jsfiddle.net/KVhUC/

    I was able to get it to work with FF, IE9 (with/without compatibility mode)

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

Sidebar

Related Questions

Consider a document in the following format: <!DOCTYPE html> <html> <head> <title></title> <body> <div
Please consider the following HTML with styling. <div style=border: 1px solid;height: 600px;> <button id=create_new_estimate
Consider the following code: <!DOCTYPE html> <html lang=en> <head> <title>HTML</title> <meta charset=utf-8 /> <style
Consider the following markup: <!DOCTYPE html> <html> <head> <title>Test Page</title> <link href=screen.css rel=stylesheet />
This problem is only in IE. Consider the following HTML: <html> <body> <div style='position:absolute;left:1em;right:1em;top:1em;bottom:1em;overflow:auto;>
Consider the following rudimentary html code block: <!doctype html> <html> <head> <meta charset=utf-8> <title>iPad
Consider the following HTML snipped: <input type=submit value=Delete selected><input type=submit value=Print selected> <div class=table>
Consider the following html snippet <!DOCTYPE html> <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.4.2.js ></script> <script
Consider the following code: index.html <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd> <html> <head>
Consider the following HTML: <body> <div id=div1 onclick=toggleDivs();> div1 content </div> <div id=div2 onclick=toggleDivs();

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.