Forum Moderators: open

Message Too Old, No Replies

Absolute Postioning using CSS in .ASP Not Working

combines ASP, CSS and Javascript.

         

blrose

3:24 pm on May 27, 2004 (gmt 0)



I have an ASP file, which uses CSS and Javascript.
The ASP file is working fine as far as we know.

The ASP file generates a table full of data which has table headers at the begining of the file. I'd like to have these headers remain static on the screen as the data scrolls up "under" the headers.

We use IE6.

Here is the css file that I created :

html{
overflow:hidden;/* gets rid of the scroll bars */
max-height:100%;/* fixes the display height */
padding:0 0 101px 0;/* brings the bottom of the body up to the bottom of screen*/
background:#eee;
}

body{
margin:10px 0px 0px 0px;/* resizes the body(top:bottom:right:left) */
height:100%;/* Whole Screen Height for IE */
overflow:auto;/* adds scroll bars if required */
border-top:1px solid #000;/* to show where the top of the body starts */
border-left:1px solid #000;/* to show where the left side of body starts */
background:#fff;/* background color */
}

#static{
position:absolute;
top:10px;
left:6px;
width:98%;
height:25%;
background:transparent;
}

My asp script is reading the .css file ok I can use the css to change the margins etc. However it seems to be ignoring the "position:absolute". I am using
<div id='static'> with in the body of the ASP file.

What else can I try?
bonnie

Jimmy Turnip

1:26 pm on May 28, 2004 (gmt 0)

10+ Year Member



I would have thought you would need two divs to achieve this?

Put the body css in another one called #sheet or something, surround the content with <div id ='sheet'> and position it, then position the header above it. Currently your css is positioning the #static absolute to the page which means if the top of the page scrolls off, so will the contents of <div id='static'>.

raptorix

1:40 pm on May 28, 2004 (gmt 0)

10+ Year Member



This topic should be placed in HTML and Browsers. Asp has nothing to do with it since its client side Code.