Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asp:Table renders differently in VS2008 than IIS 6.0

Posted on 2011-03-01
9
Medium Priority
?
524 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 

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 1000 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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

661 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