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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:26:51+00:00 2026-05-24T17:26:51+00:00

IE7 is ignoring my min-width setting. I read that IE7 supports min-width as long

  • 0

IE7 is ignoring my min-width setting. I read that IE7 supports min-width as long as you are in Standards mode (not quirks). I specified

<!DOCTYPE html>

as my header. The markup is valid. I still can’t get IE7 to respect min-width. What should I do?


Sample Code

     <table class="ProcedureTable">
        <thead>
            <tr>
                <th>column data</th>
                <th>column data</th>        
                <th>column data</th>
                <th>column data</th>
                <th>column data</th>
            </tr>
        </thead>
                    <tr class="PadColumns">
                        <td class="ExpandName">
                            column data
                        </td>

CSS

.ExpandName
{
    min-width:25em;
}
  • 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-24T17:26:52+00:00Added an answer on May 24, 2026 at 5:26 pm

    Ah Yes.. I ran into this a while ago

    check out this link

    http://blog.throbs.net/2006/11/17/IE7+And+MinWidth+.aspx

    Essentially … you need to include this shim in JS to manually hack the rule

    Below is the way that I handle it tho

    Just call the function onload of the body

        /*
    author: Rob Eberhardt
    desc: fix MinWidth for IE6 & IE7
    params: none
    returns: nothing
    notes: cannot yet fix childless elements like INPUT or SELECT
    history:
       2006-11-20 revised for standards-mode compatibility
       2006-11-17 first version
    */
    function fixMinWidthForIE(){
       try{
          if(!document.body.currentStyle){return} //IE only
       }catch(e){return}
       var elems=document.getElementsByTagName("*");
       for(e=0; e<elems.length; e++){
          var eCurStyle = elems[e].currentStyle;
          var l_minWidth = (eCurStyle.minWidth) ? eCurStyle.minWidth : eCurStyle.getAttribute("min-width"); //IE7 : IE6
          if(l_minWidth && l_minWidth != 'auto'){
             var shim = document.createElement("DIV");
             shim.style.cssText = 'margin:0 !important; padding:0 !important; border:0 !important; line-height:0 !important; height:0 !important; BACKGROUND:RED;';
             shim.style.width = l_minWidth;
             shim.appendChild(document.createElement("&nbsp;"));
             if(elems[e].canHaveChildren){
                elems[e].appendChild(shim);
             }else{
                //??
             }
          }
       }
    }
    

    there is another way to do it as well

    http://perishablepress.com/press/2007/01/16/maximum-and-minimum-height-and-width-in-internet-explorer/

        * html div#division { 
       height: expression( this.scrollHeight < 334 ? "333px" : "auto" ); /* sets min-height for IE */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have noticed that IE7 does not url-encode querystring parameters retrieved from javascript, e.g:
IE7 compatibility mode does not work in DNN 5.6 How do i get this
In IE7 standards mode rendering, a strange thing happens with the following body: <body>
It would seem that IE7 puts an extra 1px of spacing above and beneath
In IE7, my jQuery-UI dialog openers seem to be setting focus to the (invisible)
I know IE7 has issues... I've read posts here and on Google telling me
IE7 and IE8 are not letting me splice my array (Safari, Chrome, Firefox work):
The browser is IE7. I have no control over that. It sucks, but it's
We've noticed that IE7 has an odd behavor with code blocks posted on Stack
It seems that IE7 defaults to Shink to Fit on the printing of HTML

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.