473,395 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Emulating frameset - relative height

Hi,

I'm trying to make a HTML-template which consists of a non-scrolling
header and scrolling content.

I'm using this page: http://limpid.nl/lab/css/fixed/header as
inspiration.

However the trouble is that my pages (generated automatically via ASP)
have a header of variable height. Where in the example, it is quite
fundamental to have a specific value for the height of the header and
use the same value for the contents padding-top.

Is there some technique, preferably in CSS, to fetch the height of the
header and use this value for the contents padding-top property.

My page is strictly for an intranet where IE6 is the only browser
available, so solutions need not be workable on all major browsers or
follow standards.

Btw. if the user changes text-size og the size of the browser-window
it may cause the height of the header to change as well.

Thanks in advance.
Ryan Dahl

Jul 21 '05 #1
3 5108
On Sat, 25 Jun 2005 23:44:28 +0200, Ryan Dahl <ju***********@hotmail.com> wrote:
Hi,

I'm trying to make a HTML-template which consists of a non-scrolling
header and scrolling content.

I'm using this page: http://limpid.nl/lab/css/fixed/header as
inspiration.

However the trouble is that my pages (generated automatically via ASP)
have a header of variable height. Where in the example, it is quite
fundamental to have a specific value for the height of the header and
use the same value for the contents padding-top.

Is there some technique, preferably in CSS, to fetch the height of the
header and use this value for the contents padding-top property.

My page is strictly for an intranet where IE6 is the only browser
available, so solutions need not be workable on all major browsers or
follow standards.

Btw. if the user changes text-size og the size of the browser-window
it may cause the height of the header to change as well.

Thanks in advance.
Ryan Dahl


I'm using this:

#topBar { Z-INDEX: 1; TEXT-ALIGN: center; WIDTH: 100%; BACKGROUND-COLOR:
#999933; COLOR: #CCFFCC; FONT-SIZE: 130%; MARGIN-LEFT: -10px;
}
#topBar { POSITION: fixed; POSITION: expression("absolute");
TOP: 0em; TOP: expression(parseInt(document.body.scrollTop +0));
}

The site is http://masonc.home.netcom.com

The "expression" uses a Javascript calculation. BUT ! It works with
Javascript turned off. Apparently the math functions are resident in the
browsers. MSIE jitters a bit when scrolling but not bad.

Mason C sorry, I don't remember who to credit for this

Jul 21 '05 #2
On Sat, 25 Jun 2005 23:44:28 +0200, Ryan Dahl
<ju***********@hotmail.com> wrote:
However the trouble is that my pages (generated automatically via ASP)
have a header of variable height. Where in the example, it is quite
fundamental to have a specific value for the height of the header and
use the same value for the contents padding-top.


Found a solution - used this for the padding-top property:
expression(header.offsetHeight + 'px');

/Ryan
Jul 21 '05 #3
JRS: In article <3g********************************@4ax.com>, dated
Sat, 25 Jun 2005 22:47:36, seen in news:comp.infosystems.www.authoring.s
tylesheets, Mason A. Clark <ma*************@ix.netcom.com> posted :
I'm using this: #topBar { POSITION: fixed; POSITION: expression("absolute");
TOP: 0em; TOP: expression(parseInt(document.body.scrollTop +0));
}


document.body.scrollTop is a Number, at least in my system.
I don't see a need to add zero or to use parseInt.

If, in other systems, it is a string of the form 567px, I don't see a
need to concatenate 0.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 21 '05 #4

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

Similar topics

13
by: Kai Grossjohann | last post by:
I have a web app which comprises different frames: a menu bar frame, a search form frame, a result list frame. Depending on the state, only a subset of these frames is available. (Eg, after...
1
by: Wilhelm Kutting | last post by:
Hi i like to make a complex layout with css. All the content is inside a container div. I like to get the following sequence without the css-layout: logo title mainnav content i can only...
2
by: JJ | last post by:
Hi, I am using a frameset in an aspx page, like so: <Frameset id="Frameset" BORDER="0" ROWS="350,3%" HEIGHT="100%" FRAMEBORDER="0" FRAMESPACING="0" runat="server">
6
by: Gérard Talbot | last post by:
Hello fellow stylers, When trying this page http://www.gtalbot.org/BrowserBugsSection/PercentualRelativePositioning.html I get different rendered layouts with IE 6, IE 7 beta 2, Firefox...
2
by: Psapg | last post by:
Hi Probably not the best group to post this, but i could'nt find the "right"one so here it goes.. I have a frameset page as my index.html page and have noticed that if my page is opened in...
19
by: derelicten | last post by:
hello , I have an issue positionating some pics I want to anchor to an existing table cell but I cant just place regular position on the cell because the background is fixed height and the set of...
1
by: GGG | last post by:
Neither go the way I want them to... Absolute doesn't get it right over multiple browsers. Relative puts it in the right place, but only the portion that it is "relative" the style, #wleMenu, is...
4
by: Alex | last post by:
Hello, I'm rewriting our corporate website, and to make editing the format later I want to rewrite it completely using CSS with no table tags. I've used CSS for years, but never exclusively, so...
4
by: maminx | last post by:
Hello..i have problem, hope someone can help me..i have this frameset below : <FRAMESET ROWS="55%" COLS="37%,63%"> <FRAME NAME="runningTrade" SRC="http://runningtrade.com" scrolling="no"> ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.