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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:45:59+00:00 2026-06-08T10:45:59+00:00

solution <!DOCTYPE html> should be present at the top of the page to indicate

  • 0

solution

<!DOCTYPE html> should be present at the top of the page to indicate to browsers that the page should be rendered in standard mode.

Internet Explorer 8+ includes a compatibility view setting which will render pages as they would appear in IE 7. By default, all intranet zoned sites are set to render in compatibility mode, which produces the issue outlined below. To force a page to never render in compatibility mode, this meta tag can be added to the <head> section of the page.

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7;" />

In my case I’m using ASP.NET so for convenience I added the above as a custom header to cause all pages in my site to render in standard mode.

Original post

First off, I’m working in an environment that uses IE 8 exclusively, so I don’t need a solution that’s compatible on all browsers – just IE.

I have a page that displays a table with width=100%, and each cell except those in the last column set to a specific width (in this case 200px). When rendered in IE it works as intended. That is, I get 3x columns which are 200px wide, and the 4th column takes up whatever room is left over (subject to user’s screen resolution/window size).

However if I add an additional row to the table, and have this bottom row span across all columns, Internet Explorer 8 and 9 completely disregards the specified column widths depending on the width of the text in this bottom row. This behaviour is even more unusual when I incorporate text-align:right into the columns in the first row. When I do this, IE aligns the text according to the width that the columns should be, while inserting unusable space between the columns. This is best illustrated with a screenshot.

from img685.imageshack.us/img685/7117/iecolumnwidths.png

This shows the table being rendered correctly in Opera 12 but not in IE 8 or 9. Here’s the HTML I used to illustrate the problem:

<html>
<head>
  <style>
    td{
       background-color:#AAAAAA;
    }
    .s1{
       text-align:right;
       width:200px;
    }
  </style>
</head>
<body>

<table width="100%">
  <tr>
    <td class="s1">Col 1 a a a a a a a a a</td>
    <td class="s1">Col 2 a a a a a a a a a</td>
    <td class="s1">Col 3 a a a a a a a a a</td>
    <td>Col 4</td>
  </tr>
  <tr>
    <td class="s1">Col 1 a a a a a a v vv vv v v v</td>
    <td class="s1">Col 2 a a a a a a v vv vv v v v</td>
    <td class="s1">Col 3 a a a a a a v vv vv v v v</td>
    <td>Col 4</td>
  </tr>
  <tr>
    <td colspan="4">This text causes the table columns to expand xxxxxxx xxxxxxx xxxxxxxx xxxxxx aaaaaaa aaaaa aaaaaa aaaaaaaa aaaaa xxxxxxx xxxxxxx xxxxxxxx 

xxxxxx aaaaaaa aaaaa aaaaaa aaaaaaaa aaaaa xxxxxxx xxxxxxx xxxxxxxx xxxxxx aaaaaaa aaaaa aaaaaa aaaaaaaa aaaaa xxxxxxx xxxxxxx xxxxxxxx xxxxxx aaaaaaa aaaaa aaaaaa 

aaaaaaaa aaaaa</td>
  </tr>
</table>

</body>
</html>

So my question is, what do I need to change to get this to render the same in IE as it does in Opera? I want the table to size dynamically while fixing the columns that I specify to a certain width.

  • 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-08T10:46:00+00:00Added an answer on June 8, 2026 at 10:46 am

    You didn’t specify a doctype wich makes IE go into quirks mode.
    So put this at the top of your page:

    <!DOCTYPE html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Help with unit testing checkbox behavior. I have this page: <!DOCTYPE html> <html> <head>
I'm observing that when using an HTML5 doctype ( <!DOCTYPE html>) , assigning a
I have a layout page thusly <!DOCTYPE html> <html> <head> <title>@ViewBag.Title</title> <script src=@Url.Content(~/Scripts/jquery-1.7.1.min.js) type=text/javascript></script>
SOLUTION Make sure in the plist that the storyboard name is listed as the
Can someone point me what is wrong in this code ? Html: <!DOCTYPE html
I practiced to center a div without a width and found a solution that
Like the title says, I want to have a HTML table that allows its
I recreated my issue here . The problem is that the 'left' div should
The following source code alerts the following results: Internet Explorer 7 : 29 Firefox
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml> <head> <style type=text/css> #wrapper{

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.