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

Div with dynamic height and scrolling content

I have a page with a content-div that scrolls and has a dynamic height.
I do this with position absolute, top and bottom. I can do this if the
other parts (divs) in the page over the scrolling part has the same
height-unit. To get the top value I add all the other heights together.
E.g. 2em + 1em + 3em = 6em.

Is it possible to accomplish this with parts having different
height-units (one is in %, another is in px and so on)? I know I can
fix this with a table.

Can I use bottom and right on a position-relative element?

The page:
http://www.freewebs.com/hasodaki/ScrollingContent.html (there may be a
publicity banner on top)

Nov 29 '06 #1
2 9201
ha***********@spray.se wrote:
I have a page with a content-div that scrolls and has a dynamic height.
I do this with position absolute, top and bottom. I can do this if the
other parts (divs) in the page over the scrolling part has the same
height-unit. To get the top value I add all the other heights together.
E.g. 2em + 1em + 3em = 6em.

Is it possible to accomplish this with parts having different
height-units (one is in %, another is in px and so on)? I know I can
fix this with a table.
How would you add px and em for instance, where px is absolute and em
depending on browser setting and/or text zoom level? Seems contradictory.

Why do you use/want/need absolute positioning?
>
Can I use bottom and right on a position-relative element?
I wouldn't know why not. You?
>
The page:
http://www.freewebs.com/hasodaki/ScrollingContent.html (there may be a
publicity banner on top)
FWIW, I did not see a banner. Does this happen only occasionally? How
does that affect your pixel-perfect layouts?

HTH
Sh.
Nov 29 '06 #2

Schraalhans Keukenmeester skrev:
ha***********@spray.se wrote:
I have a page with a content-div that scrolls and has a dynamic height.
I do this with position absolute, top and bottom. I can do this if the
other parts (divs) in the page over the scrolling part has the same
height-unit. To get the top value I add all the other heights together.
E.g. 2em + 1em + 3em = 6em.

Is it possible to accomplish this with parts having different
height-units (one is in %, another is in px and so on)? I know I can
fix this with a table.

How would you add px and em for instance, where px is absolute and em
depending on browser setting and/or text zoom level? Seems contradictory.

Why do you use/want/need absolute positioning?
Do you have an answer or not? Do you know if it's possible? If so -
how?
Why or why not I want to mix px, % or em is not inportant!
Or have you not understood my question?

Can I use bottom and right on a position-relative element?

I wouldn't know why not. You?
Have a sample url. As I see it it doesn't work with position-relative.

The page:
http://www.freewebs.com/hasodaki/ScrollingContent.html (there may be a
publicity banner on top)

FWIW, I did not see a banner. Does this happen only occasionally? How
does that affect your pixel-perfect layouts?
If you didn't see it it's good!
HTH
Sh.
Nov 29 '06 #3

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

Similar topics

4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
5
by: Secret Guy | last post by:
Because of my experience posting various places over the last couple of weeks: I'm expecting to be greated with hostility for asking about concepts instead of "practical" things, since that has...
8
by: Serge Hartmann | last post by:
hi there, I created two different backgrounds for the same page to obtain a (fake) left margin and a (true) right margin. -> left background, defined in body section, aligned bottom and with...
3
by: Ryan Dahl | last post by:
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...
6
by: Martin Plotz | last post by:
Dear Newsgroup, I would like to have a page with a footer on the bottom of the page with a fixed height. The upper part should have the remaining height. In frames I could achieve this with "*" as...
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
1
by: knkk | last post by:
Hi, I have an iframe that fetches content from a different domain. This is my URL, which has an iframe that fetches content from another site careerbuilder.co.in (this is a partnership channel, so...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.