Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page height 100%

Status
Not open for further replies.

D2C

Programmer
Aug 27, 2001
86
BE
Hi there,

I am restyling a website that was made using frontpage.
The website was made with use of frames... brrr...terrible!


Right now I am rebuilding the pages with use of tables,
I can set the width of the page to automatically resize to the screen resolution, but with the height I am having troubles!!!

Can somebody help me figure out how to automatically resize the heigth (even when there is no content) to the resolution of the screen?

Thanks a billion!!

greetz,
d2c
 
Do you screen resolution (as in the number of pixels displayed by the user's monitor) or the size of the browser window (which can be different to screen resolution - and often is)?

- Web design and ranting
- Day of Defeat gaming community
"I'm making time
 
I dont think it's good to use tables, if you want to specify height of the table.

You can use nested tables, but I think it's better to make it in CSS.

You dont happend to have Imageready, which comes with Photoshop, do you?

If so, you can make CSS out of a picture of the design! It's truly very simple, and in my mind a good tool.

You can then choose to export in XHTML, etc. and it fixes "everything".

There are some issues, like tilable things, but it's very simple to fix those things aferwards.

Can you upload a picture of how you wish that the layout should be? I think it will be easier for us to see what you actually need, if you give us a screenshot of how you want it to look..

ps. you might also draw it as a scetch in mspaint, if you have no other image-tool at hand.

Olav Alexander Mjelde
Admin & Webmaster
 
There is no way to use pure CSS to make an object (table, div, etc) have 100% of the browser window. 100% of a height means that the object has 100% of the parent container's height.

This works for width but a height must be set explicitly for it to work.

There are workarounds such as solid-colored background images, etc., or you could use JavaScript when the page loads to determine the available height of the window and then stretch the object (preferrably a div - tables are OUT in new-wave design) to the full size of the window.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Cflava:
This is why I want him to upload a picture of the wanted design?

He can have a floating DIV, or something like that?

You can define <table height="100%">, but it's not standard code to define the height in tables, I've heard.

eg. this would work in IE:
Code:
<table width="100%" height="100%" border="1">
  <tr>
    <td>
      &nbsp;
    </td>
  </tr>
</table>

I dont know which browsers will support this, since I've been told it's not standard html.

I would rather keep myself away from such a thing, and rather have the content deside how the layout should be, or have a static height and then control the overflow with css.

Olav Alexander Mjelde
Admin & Webmaster
 
When including a complete doctype, it is not valid.

Put this in an html page, and view it:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]

<html>
<head>
<title>new document</title>
</head>

<body>
<table height="100%" width="100%" style="background-color: #ccc;">
	<tr><td>Hello</td></tr>
</table>
</body>

</html>

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Cflava: yes, that's what I thought.

thank you for confirming my.. knowledge..(?)..
anyways, I dont understand why it is not apart of the standards, but I guess there are some work-arounds for this issue.

I however see no reason for using the 100% height my self, as I prefer either dynamic height, or static height. Dynamic, as controlled by content, not be resizing image.

I think resizing the height due to browser research, can disrupt the webdesign.

Olav Alexander Mjelde
Admin & Webmaster
 
I agree, but as we all know, clients are clients, and they always will be. If they want yellow blinking text on a bright red background, that's what they'll get.

;)

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top