|
|||
Scrollen im body-Bereich unterdrücken
hi,
ich möchte gerne, dass im body-Bereich das Scrollen unterdrückt, aber dass Scrollen in der Hauptspalte (main) ermöglicht wird. Mein CSS-Code: PHP-Code:
PHP-Code:
Hat da jemand für mich einen Tipp wie ich nur bei übergroßem Inhalt das Scrollen ausschließlich für den main-Bereich ermöglichen kann? Geändert von seeadler (28.02.2015 um 00:24 Uhr) |
Sponsored Links |
|
|||
Zitat:
|
|
|||
Zitat:
Siehe kleines Beispiel: HTML-Code:
<!DOCTYPE html> <html lang="de"> <head> <title>Titel der Webseite</title> <meta charset="UTF-8"> <style type="text/css"> * { margin: 0; padding: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } html, body { height: 100%; text-align: center; } html { overflow: hidden; } body { font: 100.1% Verdana, Geneva, Arial, Helvetica, sans-serif; } #wrapper { background-color: fuchsia; min-height: 100%; } #container { padding-top: 5%; padding-bottom: 54px; /* footerhöhe abstand */ } #main { background: orange; margin: 0 auto; max-height: 400px; height: 300px; max-width: 800px; overflow: auto; } #main-inner { background: #fff; padding: 1%; margin: 1%; } #footer { background: lime; border-top-style: groove; color: #000; position: relative; margin: -3.375em auto 0 auto; line-height: 50px; } </style> </head> <body> <div id="wrapper"> <div id="container"> <div id="main"> <div id="main-inner"> <h1>Herzlich Willkommen</h1> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.</p> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.</p> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.</p> </div> </div> </div> </div> <footer id="footer"> <p>Und hier ist der Inhaltsbereich des footers</p> </footer> </body> </html> Mit dem, was du zeigst, kann man nicht viel anfangen ziemlicher Caros. _______________ MfG Roland |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Verweise im Body Bereich erstellen (HTML, Javascript) | Punto1976 | Javascript & Ajax | 3 | 01.05.2010 15:08 |
Ungewöhnlicher abstand beim clearen von floats | adrianno | CSS | 14 | 16.09.2009 15:20 |
Ausrichtung Aufzählungszeichen | snowbound_ch | CSS | 11 | 19.02.2008 21:12 |
backgroundimage im body bereich in .php datei | bastien | Serveradministration und serverseitige Scripte | 9 | 13.12.2006 11:11 |
overflow:scroll ... ohne feste größe | zelle | CSS | 4 | 12.02.2006 20:21 |