ASP.NET page displays different at runtime

Hi:

I am new to .NET. I have designed a projet in ASP.net using VB.NET. I am able to load all the pages but the pages at runtime don't display the same like design mode pages. The frames seem to overlap each other at runtime. I am not using frames but <div> like divisions. Why does the page display different at runtime?

Any help will be greatly appreciated.
 
Hi,

The reason this is occurring is because your IDE (assuming its Visual Studio) is using absolute positions for example, look at your div tags, they will have a display attribute and it will have x, y, z axis values. If this is the problem, its best to edit the divs in HTML mode and remove those absolute values.

If it is, can you send a sample of the html code. I'll look at it and give you my 2 cents.


thanks
 
Thanks Maverick. Can you please look into this. What should i do here?

I changed the z-index in layout to 101 as it allows me to move the frames.

what am i doing wrong here?
:(

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Index.aspx.vb" Inherits="FINALTCW.Index" enableViewStateMac="True" debug="False" aspCompat="True" smartNavigation="True" buffer="True"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Index</title>
<meta name="vs_defaultClientScript" content="VBScript">
<meta content="True" name="vs_snapToGrid">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:panel id="Panel1" style="Z-INDEX: 103; LEFT: 96px; POSITION: absolute; TOP: 0px" runat="server"
Width="800px" Height="992px" BackColor="White">
<DIV style="CLEAR: none; DISPLAY: block; VISIBILITY: visible; WIDTH: 808px; BORDER-TOP-STYLE: solid; FONT-FAMILY: Arial, Monospace; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 179px; BORDER-BOTTOM-STYLE: solid"
ms_positioning="GridLayout">
 
The problem still persists even after removing the z-index. A couple of nights before I was able to see them correctly. I saved the code and didnt work on it till the next day. That was when i started having problems. I didn't even change the code what was before.

I am so thankful to you for looking into this
 
Visual Studio can act very stupid at times. Hopefully the new version has this fixed. Can you remove this

style="Z-INDEX: 103; LEFT: 96px; POSITION: absolute; TOP: 0px"


and try again
 
If I remove the positioning, that division does not move to the right. it overlaps on the left division. I have 2 divisions placed next to each other. If I remove that it does not allow me in design view to move the divisions.

By the code I have currently I am able to view things nicely in design view. But at runtime, the divisions overlap. previously this did not happen. i dont know what I did that this started behaving this way. I have visula studio.net

Alos my font size gets reduced in explorer which didnt happen before


:(
 
In which case, why don't you have a table

<table border=0 cellpadding=0 cellspacing=0 align="center" width="100%">
<tr>
<td><!-- first panel --></td>
<td><!-- 2nd panel --></td>
</tr>
</table>
 
Back
Top