I have this:
<div style="width:10 0%;height:20px" >
bla
</div>
<div style="width:10 0%;height:???;o verflow:scroll" >
something
very
tall
so
that
it
produces
a
scrollbar
</div>
<div style="width:10 0%;height:50px" >
another stuff
</div>
The three question marks indicate what I want to put there. What I
want to say is "window height minus 20px minus 50px", but I don't know
how to say it.
My current workaround is to put some JavaScript before </body> which
calculates the height of the window in pixels, subtracts 75 from this
number (75 = 20 + 50 + fudge factor), then frobs the DOM of the
document to say "width:4711 px" instead of "width:???" .
The problem with this workaround is that the corresponding div doesn't
resize when the user resizes the window: while the divs get narrower
or wider properly when the user resizes the window, the middle one
doesn't get taller or --err, less tall?-- during the resizing.
On a whim, I also tried "width:90%" but that resulted in the div
growing as tall as the "something tall" inside it.
I hope I made it clear what I want. Flame away, if I didn't.
Suggestions?
Kai 11 4468
Kai Grossjohann wrote: I have this:
<div style="width:10 0%;height:20px" > bla </div> <div style="width:10 0%;height:???;o verflow:scroll" > something very tall so that it produces a scrollbar </div> <div style="width:10 0%;height:50px" > another stuff </div>
The three question marks indicate what I want to put there. What I want to say is "window height minus 20px minus 50px", but I don't know how to say it.
Only way is JavaScript AFAIK My current workaround is to put some JavaScript before </body> which calculates the height of the window in pixels, subtracts 75 from this number (75 = 20 + 50 + fudge factor), then frobs the DOM of the document to say "width:4711 px" instead of "width:???" .
You mean height:???;, right? The problem with this workaround is that the corresponding div doesn't resize when the user resizes the window: while the divs get narrower or wider properly when the user resizes the window, the middle one doesn't get taller or --err, less tall?-- during the resizing.
That is possible to detect using JS (the resizing part).
--
Anne van Kesteren
<http://www.annevankest eren.nl/>
Can't you fix the bottom div to the bottom of the viewport so you don't
have to specify a height on the middle?
On Wed, 12 Nov 2003 19:15:18 +0100, Anne van Kesteren wrote: The three question marks indicate what I want to put there. What I want to say is "window height minus 20px minus 50px", but I don't know how to say it.
Only way is JavaScript AFAIK
--
..
Vigil <me@privacy.net > wrote in
news:pa******** *************** *****@privacy.n et: Can't you fix the bottom div to the bottom of the viewport so you don't have to specify a height on the middle?
That causes more problems than it solves. If for whatever reason the
viewport isn't tall enough to display the entire page, then a fixed footer
will stick at the bottom of the viewport and content will scroll underneath
it.
Anne van Kesteren <ma**@annevanke steren.nl> wrote in message news:<bo******* ***@reader11.wx s.nl>... Kai Grossjohann wrote: The problem with this workaround is that the corresponding div doesn't resize when the user resizes the window: while the divs get narrower or wider properly when the user resizes the window, the middle one doesn't get taller or --err, less tall?-- during the resizing.
That is possible to detect using JS (the resizing part).
How to detect this? Do I set a timer that checks every 400ms whether
the window has changed its size, or is there an event that fires when
the user resizes the IE/Mozilla/... window?
Kai
Vigil <me@privacy.net > wrote in message news:<pa******* *************** ******@privacy. net>... Can't you fix the bottom div to the bottom of the viewport so you don't have to specify a height on the middle?
What does it mean to "fix [a] div to the bottom of the viewport"?
Kai
Not if you make the middle scroll?
On Thu, 13 Nov 2003 02:56:01 +0000, Eric Bohlman wrote: That causes more problems than it solves. If for whatever reason the viewport isn't tall enough to display the entire page, then a fixed footer will stick at the bottom of the viewport and content will scroll underneath it.
--
..
Kai Grossjohann wrote: That is possible to detect using JS (the resizing part).
How to detect this? Do I set a timer that checks every 400ms whether the window has changed its size, or is there an event that fires when the user resizes the IE/Mozilla/... window?
Kai
I think you need something like this:
<http://www.google.com/search?q=javasc ript+onresize> ;-)
--
Anne van Kesteren
<http://www.annevankest eren.nl/>
Anne van Kesteren <ma**@annevanke steren.nl> writes: I think you need something like this: <http://www.google.com/search?q=javasc ript+onresize> ;-)
Ah, it seems the JavaScript reference I'm using is incomplete...
Kai
"Vigil" <me@privacy.net > wrote in message
news:pa******** *************** *****@privacy.n et... Not if you make the middle scroll?
And how do you do that? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bhennon |
last post by:
Hey all,
I have a small php script that calls a random image at the following
page.
http://www.2006ymcanationals.com/random.php
IT WORKS IF I go directly to the above link.
I am trying to call that in another page so that i get a random image
the page is http://2006ymcanationals.com/index.php using <img
|
by: BW |
last post by:
Please ignore the rest of the code, except for the highlighted part (or the line 'ent1=Entry(topf, width=25)' to line 'ent1.insert(INSERT, wrong, if you cannot see the color). You can copy this into Python and make sure you have the GIF file in the same dir. Also, make sure that you have PIL installed.
I cannot get this to work. I get an error after running it and what I'm trying to do it to evaluate what the person enters in the box for the...
|
by: Ryan R. Rosario |
last post by:
Hi -
**I apologize for posting this again. I dont think my first one went
thru**
I am in the process of converting a table based website over to a CSS
based website and I am having a problem.
The website "template" consists of 3 regions: header, sidebar and
content. Header spans horizontally across the screen at the top of the
|
by: TadPole |
last post by:
Hi all,
My main problems are:::::::::
1. Set a value within a block container that can be used and changed by
subsequent templates/block-containers/tables etc..
2. get/determine/find the setting that tell the process that the new
top of the document region is now at the end of the last
block-container used, this must be set in that last block container.
3. find the value used in the 'top" setting on the prior
|
by: Sidney Cadot |
last post by:
Hi all,
In a discussion with Tak-Shing Chan the question came up whether the
as-if rule can cover I/O functions. Basically, he maintains it can, and
I think it doesn't.
Consider two programs:
/*** a.c ***/
| |
by: bijax |
last post by:
hi,
i am new to multidimensional array of c programming .pls help me
to solve out this
how to allocate memory for mutidimensional array?
i.e a ;
|
by: Olaf Baeyens |
last post by:
I am porting some of my buffer class code for C++ to C#.
This C++ class allocates a block of memory using
m_pBuffer=new BYTE;
But since the class is also used for pointers for funtions that uses raw MMX
and SSE power, the starting pointer MUST be starting at a 16 byte memory
boundary.
In C++ I allocate more memory than needed, and in a second phase I search
for the address that starts on a 16 byte boundary. And I then use that new...
|
by: royaltiger |
last post by:
I am trying to copy the inventory database in Building Access Applications
by John L Viescas but when i try to run the database i get an error in the
orders form when i click on the allocate button "Unexpected Error":3251
operation is not supported for this type of object.The demo cd has two
databases, one is called inventory and the other just has the tables for the
design called inventory data. When you run inventory the database works...
|
by: Chen Shusheng |
last post by:
Hi all,
In fact, I want to let my memory run out. And see what will happen. My
system is windowsXp. Memory is 256M.I think my cdes will apply more memory
than I have. Codes are below:
#include <stdlib.h>
#include<stdio.h>
#define MAX 1000000000
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |