A Conversation for The H2G2 Programmers' Corner

Mildly esoteric HTML problem with

Post 1

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

I have a document with a drop-down Javascript menu, which needs to open the selection in the lower 3/4 of the (variable-size) screen. Seems simple, but...

If I put the menu section in a conventional frame at the top, and have a second frame for the content, the menu gets truncated at the frame boundary; it won't display in any frame other than the one generating it. smiley - sadface

"No Problem!" thought I, an in the lower part of the document will achieve the same result, but the menu will float over it!

And it did... Except...

The is about 1/4 the height of the screen, attached at the bottom of the menu area. I've tried (and removed) every combination of "height" parameters, both in the HTML and the attached CSS, without changing the symptoms. It shows up the same in Mozilla, IE6 and Opera, so it's not just a browser quirk. smiley - blue

height parameters have to be absolute values, according to the books I have here, but if they're not specified it *ought* to fill the remaining page... I even tried giving it a stylesheet class of "kludge", with the height parameter of "kludge" set to "100%" (stylesheet parameters can be relative values, even if the element's native parameters can't) but with no change. smiley - cry

What am I doing wrong here?

(I should mention that this document is itself inside a frame, with scrolling set to "no-scroll", else when the was full I'd get double scroll bars. I know this because I've used the trick in the past, and it worked then! smiley - wah)


Mildly esoteric HTML problem with

Post 2

Ion the Naysayer

According to the W3C's HTML specification, IFRAME heights can be specified either in % or in pixels:

http://www.w3.org/TR/html4/present/frames.html#adef-height-IFRAME
http://www.w3.org/TR/html4/types.html#type-length

If you're mixing relative and absolute heights it will cause some browsers to break the layout. I made a simple test case with a table for the top 24% (to simulate a menu) and an IFRAME with height 75% and it works correctly in Mozilla and IE 6. If you post the relevant sections of your code (or a URL) I could probably get a better idea what's going on.


Mildly esoteric HTML problem with

Post 3

Calculator Nerd 256

you can always mix js and css
but that is evil and kind of hard to learn
but if u already know it, it can hardly b beat
smiley - geek>8^B


Key: Complain about this post

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more