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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:59:59+00:00 2026-05-25T14:59:59+00:00

I have this simplified code: <div class=container> <input type=submit name=submit class=submit value=Sign Up> </div>

  • 0

I have this simplified code:

<div class="container">
    <input type="submit" name="submit" class="submit" value="Sign Up">
</div>

And the CSS for it:

input.submit{
    padding-left: 40px;
    padding-right: 40px;
    float:right;
}
.container{
    background-color: #AAA;
    float:right;
    padding: 50px;
}

I expect the div to wrap around the input button, float to the right, and its size is equal to the button’s size + the padding (50px). In other browsers it works perfectly, but there are 2 strange things happen in IE7:

  1. The width of the div stretches to the whole webpage. If I remove float:right from CSS of input.submit, then the size of the div is correct.
  2. The input button’s width is also much larger than when the button is displayed in other browsers.

This is the doc type I use:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Anyone know why these problems happen and how to solve them?

  • 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-25T14:59:59+00:00Added an answer on May 25, 2026 at 2:59 pm

    I don’t see why you need float: right on input.submit, so just remove it. If there is a reason you need it, you’ll have to show me why – there might be a workaround.

    To fix the second problem, add overflow: visible to input.submit.

    After those two changes, it looks virtually the same in IE7 and IE9: http://jsfiddle.net/33vmm/

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

Sidebar

Related Questions

I have code like this (simplified): def outer(): ctr = 0 def inner(): ctr
I have this code (which is way simplified from the real code): public interface
I have a table like this (simplified): ID | Name | Parent --------------------------------- 1
I want to have immutable Java objects like this (strongly simplified): class Immutable {
This is a simplified version of the original problem. I have a class called
Lets say I have this class (simplified): class Tag (...): children = models.ManyToManyField(null=True, symmetrical=False)
I have the following code: <div> <div onmouseover=this.style.color='red' onmouseout=this.style.color='blue' style=float:left> a <br/> b <br/>
I have a multi-table query, similar to this (simplified version) SELECT columns, count(table2.rev_id) As
I have a regular expression like this (much simplified): ^(ab)*$ And am matching against
I've simplified this example as much as I can. I have a remote function:

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.