472,328 Members | 1,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

"floating" headers above scrolling grid

Hi,

I have a caontainer div that is 80% of the width of my display and 40em
high. It will hold from 2 to 10 columns of data and will almost always
have more than 40ems of lines... so it will scroll. All of this is
working. Each column has a heading that, as the scrollbar is moved,
scrolls away just like the regular detail info.

So I am now asked to have the column headings "float" above the
scrolling grid so that when the scrollbar is moved the detal info
scrolls but the headings stay visible. I am having a heck of a time
making this work and wonder if any of you have ideas?

so I have something like

<div STYLE"float: right; width: 80%; height: 40em; ...">
<div ...>
<div id="col1" STYLE="width: 33.3%;...>
<h3>header</h3>
...content...
</div>
<div id="col2" STYLE="width: 33.3%;...>
<h3>header</h3>
...content...
</div>
<div id="col3" STYLE="width: 33.3%;...>
<h3>header</h3>
...content...
</div>
</div>
</div>

I want something like:
<div STYLE"float: right; width: 80%; height: 40em; ...">
<div style="float: left; width: 100%>
<h3 style="display: inline;">header</h3>
<h3 style="display: inline;>header2</h3>
<h3 style="display: inline;>header3</h3>
</div>
<div ...>
<div id="col1" STYLE="width: 33.3%;...>
...content...
</div>
<div id="col2" STYLE="width: 33.3%;...>
...content...
</div>
<div id="col3" STYLE="width: 33.3%;...>
...content...
</div>
</div>
</div>
The problem is that the scrollbar interferes with the inner widths of
the content columns so that the headers do not line up correctly.
ideas?

Oct 2 '06 #1
7 9525
On 2006-10-02, seven.reeds <se*********@gmail.comwrote:
Hi,

I have a caontainer div that is 80% of the width of my display and 40em
high. It will hold from 2 to 10 columns of data and will almost always
have more than 40ems of lines... so it will scroll. All of this is
working. Each column has a heading that, as the scrollbar is moved,
scrolls away just like the regular detail info.

So I am now asked to have the column headings "float" above the
scrolling grid so that when the scrollbar is moved the detal info
scrolls but the headings stay visible. I am having a heck of a time
making this work and wonder if any of you have ideas?

so I have something like

<div STYLE"float: right; width: 80%; height: 40em; ...">
<div ...>
<div id="col1" STYLE="width: 33.3%;...>
<h3>header</h3>
...content...
</div>
<div id="col2" STYLE="width: 33.3%;...>
<h3>header</h3>
...content...
</div>
<div id="col3" STYLE="width: 33.3%;...>
<h3>header</h3>
...content...
</div>
</div>
</div>

I want something like:
<div STYLE"float: right; width: 80%; height: 40em; ...">
<div style="float: left; width: 100%>
<h3 style="display: inline;">header</h3>
<h3 style="display: inline;>header2</h3>
<h3 style="display: inline;>header3</h3>
</div>
<div ...>
<div id="col1" STYLE="width: 33.3%;...>
...content...
</div>
<div id="col2" STYLE="width: 33.3%;...>
...content...
</div>
<div id="col3" STYLE="width: 33.3%;...>
...content...
</div>
</div>
</div>
The problem is that the scrollbar interferes with the inner widths of
the content columns so that the headers do not line up correctly.
ideas?
You could put the headings in the "col[123]" divs along with the
content, but make them position: fixed.
Oct 3 '06 #2
You could put the headings in the "col[123]" divs along with the
content, but make them position: fixed.
interesting idea, thanks. It is not quite doing what I had hoped for
though. I just know I'm going to have to do some semi-heroic
javascripting to get column deminsion hints from the column divs inside
the scrolling div and then draw or adjust the headings. This seems
like way too much effort for column headings. Maybe the person
demanding this behaviour will eventually listen and let the headings
scroll.

Oct 3 '06 #3
"seven.reeds" <se*********@gmail.comwrote in
news:11**********************@e3g2000cwe.googlegro ups.com:
>You could put the headings in the "col[123]" divs along with the
content, but make them position: fixed.

It is not quite doing what I had hoped for
though.
Well, you originally asked for:
So I am now asked to have the column headings "float" above the
scrolling grid so that when the scrollbar is moved the detal info
scrolls but the headings stay visible.
Doesn't the "position: fixed" do exactly that?

Oct 3 '06 #4
seven.reeds wrote:
It will hold from 2 to 10 columns of data and will almost always
have more than 40ems of lines...
[...]
<div STYLE"float: right; width: 80%; height: 40em; ...">
<div ...>
<div id="col1" STYLE="width: 33.3%;...>
<h3>header</h3>
...content...
</div>
Errr... this is a data table. Use <table>, <tr>, <th>, <tdand friends --
not this DIV muck.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Oct 3 '06 #5
seven.reeds wrote:
Hi,

I have a caontainer div that is 80% of the width of my display and 40em
high. It will hold from 2 to 10 columns of data and will almost always
have more than 40ems of lines... so it will scroll. All of this is
working. Each column has a heading that, as the scrollbar is moved,
scrolls away just like the regular detail info.

So I am now asked to have the column headings "float" above the
scrolling grid so that when the scrollbar is moved the detal info
scrolls but the headings stay visible. I am having a heck of a time
making this work and wonder if any of you have ideas?
Something like this?
<http://www.w3.org/WAI/UA/TS/html401/cp1001/1001-THEAD-TBODY-TFOOT-OVERFLOW.html>

--
Gus
Oct 3 '06 #6
Something like this?
<http://www.w3.org/WAI/UA/TS/html401/cp1001/1001-THEAD-TBODY-TFOOT-OVERFLOW.html>
Hi Gus,

Yes, something exactly like that. I have also found other discussions
on doing this with non-standards complient browsers. For example:
http://www.agavegroup.com/?p=31 This example is not perfect for me but
it gets me in the ballpark

cheers,

Oct 4 '06 #7
seven.reeds wrote:
>Something like this?
<http://www.w3.org/WAI/UA/TS/html401/cp1001/1001-THEAD-TBODY-TFOOT-OVERFLOW.html>

Hi Gus,

Yes, something exactly like that. I have also found other discussions
on doing this with non-standards complient browsers. For example:
http://www.agavegroup.com/?p=31 This example is not perfect for me but
it gets me in the ballpark
Check out this:
<http://web.tampabay.rr.com/bmerkey/examples/nonscroll-table-header.html>

--
Gus
Oct 4 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John | last post by:
Hi everyone. I'm having a real problem with a drop-down menu that I'm using. Simply, as I scroll down the page, it follows me. I don't want...
1
by: Whitney Kew | last post by:
Hello everyone, I'm developing a mixed-mode Managed C++ DLL using .NET 2003, and to avoid the potential mixed-DLL-loading-deadlock issue...
4
by: GD | last post by:
I have a collection of asp:LinkButtons on a web form. Based on some reporting criteria, I will be "highlighting" some of these LinkButtons. I'd...
4
by: bugbear | last post by:
Hello; I have (tried) to change my geocities site to be "styled" not "tabled". It's certainly made the HTML nicer. But it doesn't work as...
18
by: woessner | last post by:
Does anyone know of a fast way to multiply floating point numbers by powers of two? Conceptually, all you need to do is add to the mantissa. But...
4
by: John Friedland | last post by:
'printf' has a '%a' conversion for floating-point output: For example, printing '123456' with "|%13.4a|" produces | 0x1.e240p+16| I've...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.