CSS Help
Moderator: General Moderators
CSS Help
As most of you can tell I have posted quite a few messages regarding CSS during the past week. I have this layout that I am trying to convert from tables to CSS.
I have gotten pretty close except for one thing... I want the layout to span the entire height of the screen.
Would anyone be willing to take a look at the CSS / HTML and through in your opinions of what could make it span the entire height of the page?
CSS source: http://nigmanet.net/layouts/style.css
HTML page: http://nigmanet.net/layouts/test.html
I have gotten pretty close except for one thing... I want the layout to span the entire height of the screen.
Would anyone be willing to take a look at the CSS / HTML and through in your opinions of what could make it span the entire height of the page?
CSS source: http://nigmanet.net/layouts/style.css
HTML page: http://nigmanet.net/layouts/test.html
Last edited by nigma on Mon Sep 15, 2003 10:54 pm, edited 1 time in total.
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Re: CSS Help
It seems there is no index.html. I get 404 Not Found. I'm Waiting for confirmation, checking CSS file...nigma wrote:CSS source: http://nigmanet.net/layouts/css.txt
HTML page: http://nigmanet.net/layouts/test.html
Regards,
Scorphus.
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
It seems that you'll have to play with JavaScript to get the vertical length of the browser window and then dynamicaly set the height of the table or the div tags...
The problem is that this kind of thing is very browser dependent. So you'll have to code to each of them separately (IE, Mozilla, Netscape 4, Opera).
But maybe only IE matters, this can be easy.
Are you familiar with JavaScript?
The problem is that this kind of thing is very browser dependent. So you'll have to code to each of them separately (IE, Mozilla, Netscape 4, Opera).
But maybe only IE matters, this can be easy.
Are you familiar with JavaScript?
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Take a look:
HTML:
CSS:
On Mozilla it's working (it always works, that's why I love it). But on IE, naaa... I'll try here a bit more and see what I get...
Hope it helps.
Regards,
Scorphus.
HTML:
Code: Select all
...
<body>
<table id="mainTable" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td valign="top">
...
<script language="JavaScript1.2" type="text/javascript">
var isExplorer4p = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
var isNetscape5p = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "5");
if (isNetscape5p) {
mainTable = document.getElementById("mainTable");
mainTable.style.height = top.innerHeight + "px";
}
if (isExplorer4p) {
var tableHeight = document.body.scrollTop + document.body.clientHeight;
alert(tableHeight);
mainTable.style.height = tableHeight + "px";
}
</script>
</body>
</html>Code: Select all
#mainTable {
height: auto;
}Hope it helps.
Regards,
Scorphus.
Look at http://www.pixy.cz/css/verticalalign.html and http://www.milov.nl/code/css/verticalcenter.html.
Have fun.
Have fun.