You are here: Re: Sicky dhtml « HTML « IT news, forums, messages
Re: Sicky dhtml

Posted by SpaceGirl on 06/03/05 17:47

Jonathan N. Little wrote:
> SpaceGirl wrote:
>
>> Merlin wrote:
>>
>>> Hi there,
>>>
>>> I am wondering how it would be possible to place a graphic on the
>>> browser which sticks to the top, no matter how far you scroll down. I
>>> recently saw a banner and do wonder how they did this.
>>> Have a look http://www.spiegel.de
>>> Is this a DHTML, Flash or JS thing? I was not able to find out.
>>>
>>> Thank you for any hint.
>>>
>>> Merlin
>>
>>
>>
>> It uses two things; In IE it uses JS to do it. In Mozilla/FireFox is
>> uses CSS (which is far simpler).
>>
> You can us CSS to place the element upon page rendering, but how can you
> reposition upon a scroll event. That would would be a behavior and
> require JavaScript, right? The only pseudo behavior that is CSS
> trappable that I am aware of is 'hover'. In my site the menus 'flyout'
> with CSS using pseudo hover class (except IE with JS hack) but the whole
> navbar uses JavaScript to float with the page scroll....
>

You dont need to. There is a "fixed" property you can set on objects in
CSS. The item (such as a DIV) then remains fixed on screen regardless of
scrolling (and no need for JS). I think this doesn't work in IE, and I
cant remember the limitations of this - but worth looking up.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация