You are not logged in.

  • Login

Dear visitor, welcome to Coder Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, April 24th 2009, 1:27pm

Css/Prototype Scroll Problem

Hallo Leute,
hab ein Problem und irgendwie bekomm ich das nicht so hin wie ich möchte. Übersehe ich etwas?
Folgendes Problem.

Ich habe eine Scrollbar per Prototype/Scriptaculous hinzugefügt. Alles funktioniert einwandfrei.
Normalerweise sollte er jetzt den Text scrollen aber nicht den Text und die gesamte Seite.

Sieht jmd. den Fehler in Quellcode?

Cascading Style Sheets

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*Einstellungen*/
div#container { position: relative; left: 20px; width: 780px; }
div#head { position: relative; width: 229px; }
div#content { position: relative; width: 500px; }
 
/*Text*/
div#content div.text-content { margin-top: 25px; width: 500px; padding-bottom: 30px; }
div#content div.text-content * { text-align: justify; line-height: 20px; } 
div#content div.text-content a { opacity: 0.7; }
div#content div.text-content a:hover, div#content div.text-content a:focus, div#content div.text-content a:active { opacity: 1; }
 
/*Ajax Scrollbar*/
div#scroll-track { position: absolute; top: 103px; right: 100px; width: 21px; height: 500px; }
div#scroll-handle { position: absolute; top: 0; left: 0; width: 21px; height: 44px; background: #0d0f13; }
div#scroll-wrapper { position: relative; width: 100%; }
div#innercontent { position: relative; padding-top: 240px; width: 100%; }
div.draggable, div.draggable * { cursor: -moz-grab; }
div.draggable a { cursor: pointer; }
body.dragging, body.dragging * { cursor: -moz-grabbing !important; }


HTML Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div id="container"
  <div id="content" class="site_startseite">
    <div id="innercontent">
      <h2>Startseite</h2>
      <div class="text-content">
        <p>Ich bin ein Text...</p>
        <br />
        <p>Ich bin ein Text...</p>
        <br />
        <p>Ich bin ein Text...</p>
        <p>Ich bin ein Text...</p>
      </div>
    </div>
  </div>
</div>


Wenn ich jetzt bei #content, #innercontent oder div#content div.text-content margin oder padding setzte positioniert er es zwar richtig, aber wie gesagt der Text und die gesamte Seite Scrollen dann mit. Wenn ich die margin und padding Werte weg lasse scrollt nur der Text aber der gesamte Content Bereich ist falsch positioniert.

Lg

2

Saturday, April 25th 2009, 10:48am

Hast du den Code online abrufbar? Live (d.h. mit Firebug) erkennt man sowas meist schneller.
Ansonsten poste mal bitte die restlichen Code-Snippets die zum Betrieb einer Demo notwendig sind.
Lg

3

Saturday, April 25th 2009, 11:50am

Hast du den Code online abrufbar? Live (d.h. mit Firebug) erkennt man sowas meist schneller.
Ansonsten poste mal bitte die restlichen Code-Snippets die zum Betrieb einer Demo notwendig sind.
Lg


Hab dir ne Nachricht mit dem Link zur Live Seite geschickt. Danke :)

Edit: Also bin schon soweit, das nur noch der Content scrollt, aber dann wie gesagt sitzt das alles so komisch???? Und wenn ichs dann richtig einstelle per margin/padding dann scrollt halt die ganze Seite immernochmit.

4

Saturday, April 25th 2009, 12:35pm

Hi,

das ist ja schön, dass du das D0nut geschickt hast :thumbsup:
Aber es kann dir niemand anders helfen und wenn jemand auf das selbe Problem stößt, dann kann er das auch nicht nachvoillziehen, weil entweder der wichtige Code Ausschnitt oder die Liveseite fehlt ;)

5

Saturday, April 25th 2009, 12:41pm

Hi,

das ist ja schön, dass du das D0nut geschickt hast :thumbsup:
Aber es kann dir niemand anders helfen und wenn jemand auf das selbe Problem stößt, dann kann er das auch nicht nachvoillziehen, weil entweder der wichtige Code Ausschnitt oder die Liveseite fehlt ;)


@vince: Mein Kaffee hat heute morgen wohl net so viel gebracht. Total bescheuert :D Du hast natürlich absolut recht *g*

This post has been edited 1 times, last edit by "VOLKAN" (Apr 25th 2009, 9:38pm)


6

Saturday, April 25th 2009, 7:40pm

wow, solch eine Scrollbar ist aber nicht sehr intuitiv. Da würde ich stark Abstand von nehmen.
Was genau funktioniert nicht? Bei mir (firefox3) scrollt nur der Text. Er scrollt allerdings über das statische Header-Bild. Das kannst du mit z-index in den Vordergrund holen.

Similar threads

Social bookmarks