Closed Thread Icon

Topic awaiting preservation: Another Drop Down Question (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8781" title="Pages that link to Topic awaiting preservation: Another Drop Down Question (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Another Drop Down Question <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 07-25-2003 03:22

Hi, guys.
How are you?
Could I ask you this?
I have just made this drop down.
Well, feel cool.
But I don't understand a bit of code:

code:
table.menu{
visibility: hidden;
position: absolute;
}



How does position:absolute; part work??? If I delete it, something funny thing happens. Would you have any idea of it?



Hiroki Kozai

Archonian
Nervous Wreck (II) Inmate

From: Sweden, Malmoe
Insane since: Jan 2003

posted posted 07-28-2003 03:04

That is indeed a very simple way of doing a rollover-menu. Not much code at all.

with
position: absolute;
set to an object you can position this object exact with pixels on the website.

example:
#objt { position: absolute; left: 100px; top: 100px; }
<div id="objt">
this object will be positioned at 100pixels from the left and 100pixels from the top of the browser.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 07-28-2003 05:12

Hi, mate.
Many thanks for your reply.
Could I ask you a bit more?
Well, I understand what you mean.
Please see my thread once again?

code:
table.menu{           
visibility: hidden;
position: absolute; }



This doesn't say anything about where to positon, does it? Actually I don't understand this way. I deleted positon: absolute; from above. Then I got above funny thing. Hmm.....would you know what I mean??? Would you know how it works?



Hiroki Kozai

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-28-2003 05:43

By setting an element's position to absolute, you remove it from the "document flow" - in other words, it doesn't take up any space.

When you remove that line, the dropdown box takes up space again, so the element in which it is contained gets bigger, to hold it.

I must admit, though, that I'm also not quite sure why it appears in the correct position when position:absolute is set, but its coordinates (left/top) are not set. I would think it would appear in the upper left of the browser.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 07-29-2003 06:57

Hi,Slime:

quote:
By setting an element's position to absolute, you remove it from the "document flow" - in other words, it doesn't take up any space.



That is great. Thanks for your explanation.
How are you today?
Have a good day, mate.
Cya.

Hiroki Kozai

« BackwardsOnwards »

Show Forum Drop Down Menu