What I have noted is that the images are outside tables.
Probably you need
to put them inside <TD> so that they are positioned
proportionally to the
website.
In addition, you are using pixels for width and height of
objects. I suppose
you need to use percentage if you want them to resize as the
browser is
being resized.
You could also look at HTML code of websites that resize
automatically.
Boster.
-----Original Message-----
From: Discussion of building .NET applications targeted for
the Web
[mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of David Emerson
Sent: 26 May 2006 23:39
To: DOTNET-WEB DISCUSS.DEVELOP.COM
Subject: Re: [DOTNET-WEB] Resizing pages to fill Browser
I have tried all sorts of permutations (except of course the
correct
one :-() without any success.
Here is my code *I have taken out all the other objects
except for
the ones I want to expand to the right to fill the browser
window. It is in Visual Studio Web Developer 2.0. The page
is a
Master Page. I don't want the table to expand - just the
two IMG controls.
With the current settings, the first IMG control
(imgLogoRight)
expands to the same size as the width of the rest of the
screen so
that the actual page width is twice the screen width.
The second IMG control (imgFooterRight) remains at 110 px
(as expected).
Back to my original question - I would like my web pages to
shrink/expand to fill the web browser screen regardless of
the
display settings of the users screen. Can anyone give me a
hint as
to what command I should be looking for?
html xmlns="http://www.w3.org/1999/x
html" >
<head runat="server">
<title>Untitled Page</title>
<link href="StyleSheet.css"
rel="stylesheet" type="text/css"
/>
</head>
<body scroll="auto" style="width:
100%" >
<form id="form1"
runat="server">
<div style="width: 100%" >
<IMG src="img-home/headerback.gif"
id="imgLogoRight"
width=100% border="0" style="left: 909px;
position: absolute; top:
0px; height: 90px; z-index: 120;">
<IMG src="img-home/footer-back.gif"
id="imgFooterRight"
style="left: 909px; position: absolute; top: 595px;
width: 110px;
z-index: 122;" height="20">
<table border="0"
cellpadding="0" cellspacing="0"
style="z-index: 99; left: 11px; width: 100%; position:
absolute; top:
16px; height: 105%">
<tr>
<td colspan="2"
style="height: 83px">
</td>
</tr>
<tr>
<td style="width: 145px; height:
42px">
</td>
<td style="vertical-align: top;
width: 630px;
height: 42px; text-align: left;">
<asp:ContentPlaceHolder
ID="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td colspan="2"
style="height: 10px">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
David
At 25/05/2006, you wrote:
>Actually if you leave the cell / table widths blank then
the HTML table
>will use as little space as possible. Best bet is to
use style="width:
>100%"
>
>MK
>
>
>-----Original Message-----
>From: Discussion of building .NET applications targeted
for the Web
>[mailto OTNET-WE
B DISCUSS.DEVELOP.COM] On Behalf Of Boster Sibande
>Sent: Wednesday, May 24, 2006 9:03 AM
>To: DOTNET-WEB DISCUSS.DEVELOP.COM
>Subject: Re: [DOTNET-WEB] Resizing pages to fill Browser
>
> >I would like my web pages to shrink/expand to fill
the web browser
> >screen regardless of the display settings of the
users screen. Can
> >anyone give me a hint as to what command I should
be looking for?
>
>Use HTML tables without specifying width as container of
objects
>e.g. <table bgcolor="teal">
> <tr>
> <td>
> Put your stuff here.
> </td>
> </tr>
> </table>
>
>Alternatively you can use percentage width e.g.
<table style="width:
>100%">
>You can also use percentage width on cells <td>.
>
>Boster
===================================
This list is hosted by DevelopMentor. http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|