Solved

asp:Table renders differently in VS2008 than IIS 6.0

Posted on 2011-03-01
9
504 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now