Solved

asp:Table renders differently in VS2008 than IIS 6.0

Posted on 2011-03-01
9
513 Views
Last Modified: 2012-05-11
I have a couple of asp:tables (one is attached, the other is very similar). This centers the tables in the Visual Studio development server but not in IIS 6.0 in my demo/staging server. In VS2008, the tables are centered; in IIS 6.0 it seems to ignore the Left specification in the style attribute.

Thanks!

Gary
<table cellspacing="5px" width="60%" border="2px" style="left:20%; position:relative">
            <tr>
                <td align="right"><asp:Label ID="nameLabel" runat="server" Text="Logged In User:"  /></td>
                <td align="left"><asp:TextBox ID="nameTB" runat="server" ReadOnly="true" CssClass="userName" /></td>
            </tr>
        </table>

Open in new window

0
Comment
Question by:gmsteele44
  • 4
  • 3
  • 2
9 Comments
 
LVL 9

Expert Comment

by:gdupadhyay
ID: 35011021
Try this


           
<table cellspacing="5px" width="60%" border="2px"  style="left:20%; position:relative; z-index: auto;">
            <tr>
                <td align="right"><asp:Label ID="nameLabel" runat="server" Text="Logged In User:"  /></td>
                <td align="left"><asp:TextBox ID="nameTB" runat="server" ReadOnly="true" CssClass="userName" /></td>
            </tr>
        </table>

Open in new window

0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 35011050
try to change left:20%
to padding-left:50px;

then change the value of the 50 px based on ur requirement
0
 
LVL 9

Expert Comment

by:gdupadhyay
ID: 35011157
Its working in both case. are you using any parent control (like table to div)?
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:gmsteele44
ID: 35012688
The table is inside a div with style horizontal-align:Center. Neither of the above solutions is working in IIS. They do work in VS development server, as does my original code. I'm wondering if there is a setting in IIS 6.0 that affects this? Or a .NET service pack? I believe my server is fully up to date but I may have missed something.
0
 

Author Comment

by:gmsteele44
ID: 35013252
Here is a shot of the bad rendering (IIS 6.0) (bad.png) and the good one (Visual Studio 2008 Dev server) (good.png).
 Rendered from IIS 6.0 on Win2003 Rendered from VS2008 on Win7
0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 35014771
try to make border=1 for your table
and then start to edit the values of padding , align ..etc
once u put border =1 it can help u determine what to do
and why the table is missed
0
 
LVL 9

Assisted Solution

by:gdupadhyay
gdupadhyay earned 250 total points
ID: 35016290
It is not related to IIS or any service pack. Its basic HTML error.
Can you post the more design code (Atleast upper portion of page) ?
0
 

Accepted Solution

by:
gmsteele44 earned 0 total points
ID: 35018819
It turned out to be compatibility mode. It was turned on for intranet sites. When I turned it off, rendering was normal.

Thanks for all the suggestions!
0
 

Author Closing Comment

by:gmsteele44
ID: 35067734
Everyone was very helpful with plenty of good suggestions.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question