Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS problem with floated divs in ie

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32643
    MBAsfoor
    Member

    hi

    i m trying to create a search form and this is it’s html code :



















    and this is it’s css code:

    #search_form {
    float:right;
    border: 1px solid #C1CAD2;
    position: relative;
    z-index: 3;
    margin-top:1em;

    }
    .form-content {
    padding: 0.2em 0.2em 0.22em 0.22em;
    background: url('../images/images_collection_3.png') repeat-x scroll 0 0 transparent;
    border: 1px solid #fff;
    height: 2.1em;
    position: relative;
    }

    .button_from {
    float:right;
    background-color: #FCC530;
    border: 1px solid #BD9E43;
    margin-right: 0.3em;
    overflow: hidden;
    padding: 0;
    }

    .search_button {
    background: url('../images/images_collection_1.png') repeat-x right -1672px;
    border: 0 none;
    cursor: pointer;
    font-weight: bold;
    height: 1.8em;
    overflow: visible;
    font-size: 108%;
    }

    .text-form {
    float:right;
    }
    .search_text {
    height: auto;
    width: 30em;
    border-color: #7B7B7B #7B7B7B #CBCCCE #CBCCCE;
    border-style: solid;
    border-width: 1px;
    height: 1.5em;
    padding: 0.3em 0.2em 0.33em 0.25em;
    }

    now my problem is in ie6 and ie7

    ie6 make the #search_form div width 100% and ie7 make the form content go out the #search_form div

    i tried to discover the problem but i didn’t succeed

    how to solve this problem ?

    #77085
    markthema3
    Participant

    Everyone’s problem is in ie6 and ie7. Don’t worry about them unless you know your users will be using them. They currently only make up for about 9% of browsers worldwide. IE7 makes up for 7% in the us, and ie6 is only at 2%.

    Now on to the actual problem.
    You could just add

    	 max-width:30%;

    to the css for the form content class.

    #77046
    MBAsfoor
    Member

    i tried the

     max-width:30%;

    but it didn’t fix the problem for both ie6 and ie7

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.