473,396 Members | 1,970 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,396 software developers and data experts.

Adding whitespace at the end of a div


I have a page in two, separately scrolling, columns.

The second column contains a dictionary, with definitions
for terms found in the first column, and I have the page
set up such that when the user mouses over across text in the
first column, the focus of the second column changes so that
the relevant term is shown at the top of the second column.

So far so good.

However - the second column will always move such that the
term of interest is at the top of the second column (which
is what I want) except when it is one of the last few
terms at the end of the dictionary - in which case this
can't happen, since these terms can't go to the top,
because there's no more text at the end of the second column
to go in the rest of the div. (If that makes sense)

Unless, of course, I end the dictionary with two hundred lines
of "<br/>", which is what I'm doing at the moment. This works
fine except that

a) it seems rather inelegant.
and
b) it relies on the user not having a screen higher than 200
lines of text.

So I was wondering if there was any way in css to style an
element such that there is effectively "enough whitespace
at the end of this element to fill the height of this div".
ie, so if I scroll the div all the way to the bottom, then
the end of the text in that div will just be scrolling off
the top.

Any ideas?

--
Dr. Toby White
Dept. of Earth Sciences, Downing Street, Cambridge CB2 3EQ. UK
Email: <to***@cam.ac.uk>
Sep 6 '05 #1
3 2352
On Tue, 06 Sep 2005 16:19:20 +0100, Toby White <to***@cam.ac.uk> wrote:
I have a page in two, separately scrolling, columns.

URL?
[snip]
So I was wondering if there was any way in css to style an
element such that there is effectively "enough whitespace
at the end of this element to fill the height of this div".
ie, so if I scroll the div all the way to the bottom, then
the end of the text in that div will just be scrolling off
the top.


body: height:100%;
containing div with definitions: padding-bottom:100%;

not tested

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'

Sep 6 '05 #2
"Barbara de Zoete" <b_********@hotmail.com> writes:
On Tue, 06 Sep 2005 16:19:20 +0100, Toby White <to***@cam.ac.uk> wrote:
I have a page in two, separately scrolling, columns.


URL?


Sorry - http://www.uszla.me.uk/siesta/h2o_test.xhtml (there's a bunch
of other broken stuff on the page at the moment, but it
illustrates what I'm trying to do.)
So I was wondering if there was any way in css to style an
element such that there is effectively "enough whitespace
at the end of this element to fill the height of this div".
ie, so if I scroll the div all the way to the bottom, then
the end of the text in that div will just be scrolling off
the top.


body: height:100%;
containing div with definitions: padding-bottom:100%;

not tested


Ah. Thanks, that's what I was looking for. Bizarrely, though,
if I put that in the left hand column, it works correctly; if
I put it in the right hand column, I need to increase the
padding-bottom to 300% to make it work correctly.

If anyone can tell my why, I'd be interested, but since I've
now got it working, I'm not too worried.

Toby

--
Dr. Toby White
Dept. of Earth Sciences, Downing Street, Cambridge CB2 3EQ. UK
Email: <to***@cam.ac.uk>
Sep 7 '05 #3
Toby White wrote:
I have a page in two, separately scrolling, columns.


http://www.uszla.me.uk/siesta/h2o_test.xhtml (there's a bunch
of other broken stuff on the page at the moment, but it
illustrates what I'm trying to do.)


Ish, that's nasty. 2 horizontal and 2 vertical scrollbars. It boggles my
mind why anyone wants to do such a thing.

I can't even read anything in the too-narrow right column, plus it's
unusable for those of us who use keyboard navigation. Scrolling divs
suck. :(

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Sep 7 '05 #4

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

Similar topics

2
by: Wolfgang Jeltsch | last post by:
Hello, it is often convenient to insert whitespace into an XML document in order to format it nicely. For example, take this snippet of a notional DocBook XML document: <para> This is a...
38
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with...
8
by: Mark | last post by:
My PHP script builds a table that is too wide to fit on the paper. Two of the columns contain strings that are more lengthy than data in the other columns. I can get the table to fit by letting...
2
by: Carlitos | last post by:
Hi there, A class in Xerces J-API (Java) called TextImpl contains a property that returns whether the text is ignorable whitespace...
0
by: Shan Plourde | last post by:
Hi everyone, I have been using various regular expressions with the ASP.NET RegularExpressionValidator for quite some time. In general it works very well. One of the common regex's that I use...
3
by: David Pratt | last post by:
Hi. I am splitting a string on a non whitespace character. One or more whitespace characters can be returned as items in the list. I do not want the items in the list that are only whitespace (can...
9
by: amattie | last post by:
Does anyone have any idea on how I can strip the extra whitespace in the XML that shows up when I receive a response from an ASP.NET 2.0 webservice? This has been discussed before, but no one has...
10
by: Mason Barge | last post by:
I have a standard POST form consisting of two types of input: text input and textarea. The form downloads current settings from a mysql database. The user can update the information by modifying...
13
by: Chaim Krause | last post by:
I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
jinu1996
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...
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.