i want to design a page in gridlayout because it has the benefit of not bothering with tables, spacer images etc., i want my page to be 800x600 and appear centered in the browser when they have higher resolution
to do this i'm making the form in flow layout and creating a panel within a centered div tag, this panel has my design as a background image, the problem is that it creates a margin on the left and on top of it, i have no idea why and it's really frustrating because i can't realize how to use visual studio to design well and can't find any help anywhere
here's the html that i was describing and that creates that margin space, can someone please tell me hwo to get rid of it, i wanted to attach an image but i dont seem to be able to do this on this forum
<%@dotnet.itags.org. Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb" Inherits="Portfolio.WebForm2"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm2</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body>
<DIV style="BACKGROUND-IMAGE: url(file:///C:\Inetpub\wwwroot\VBSHIT\Portfolio\Images\basicDesign.jpg); WIDTH: 800px; POSITION: relative; HEIGHT: 600px"
ms_positioning="GridLayout"></DIV>
</body>
</HTML>One possibility is to use a table and center the table to get rid of this problem:
<div align="center">
<table>
<tr>
<td>
(the panel goes here)
</td>
</tr>
</table>
</div>
You can't easily use <div> tags to centre your panelvertically on the screen. You will probably have to resign yourself to at least one table, as bdesmet suggested. So, to extend his suggestion:
<div align="center">
<table height="95%">
<tr>
<td valign="center">
(the panel goes here)
</td>
</tr>
</table>
</div>
I've given the table a height of 95%, rather than 100%, because the panel will look centred if it's slightlyabove the centre of the browser window.
0 comments:
Post a Comment