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!

Alternative to 100% height ?

Status
Not open for further replies.

Kareem

Programmer
Nov 11, 2002
13
CH
Hi

I just read about the 100% height problem with doctype. I'm wondering if there is an alternative.

Here my case:

I'm working on a page which includes a Menu and underneath some Text as content. Everything centered in the page. This area should have a fixed width with a different backgroundcolor.
The point is that this area shouldn't end but go till the bottom of the page.
I've done this with a table and 100% heigth, but by taking out the Doctype declaration and accepting the "quirks".

Simple Example: (The final page: )


QUESTION:
Is there a way to do this according to the standards (doctype...) and whitout using javascript??

Would apreciate your help
Kareem
 
This thread recently beat this topic nearly to death: thread215-1016472

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
If I understand you correctly, something as simple as this might work. long.gif is a 1 pixel wide 1600 pixel height, transparent gif.

You may also see it here:

Code:
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">
<head><title>Black and White Background, Red Division</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
body  {background: white url('bw.gif') center top repeat-y fixed}
.long {background: black url('long.gif') center top repeat-y fixed}
</style></head><body>
<div align="center">
<table style="width:300px; background:red">
<tr><td><img src="long.gif" alt=""></td>
<td valign="top">
<h1><span style="color:white">Long Division</span></h1>
</td></tr></table></div></body></html>

You could just use a background color for the body.

Clive
 
thx traingamer
your hint helped me a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top