|
|||
![]()
Guten Abend
Ich möchte eine Horizontale Navigationsleiste an die ganze breite des Fensters anpassen. (variiert ja je nach Benutzer) CSS body { font: normal 100.00% Helvetica, Arial, sans-serif; color: black; margin: 0xp; padding: 0px; width: 100%; } ul#Navigation { margin: 0px; padding: 0px; text-align: center; background-color: silver; alignment-adjust:central; } ul#Navigation li { list-style: none; display: inline; margin: 0px; padding: 0px; } ul#Navigation a, ul#Navigation span { float: left; width: 14%; margin: 0px; padding: 0px; text-decoration: none; font-weight: bold; color: black; background-color: #ccc; } ul#Navigation a:hover, ul#Navigation span { color: white; background-color: gray; } ul#Navigation div { clear: right; } Doch wie es so ist, hat es immer am rechten Rand einen etwa 1 cm grossen Abstand. Also je nach Fenstergrösse. Wie kann ich die gesamte Breite auf 100% setzen. Gruss und im voraus schon vielen Dank Ilario |
Sponsored Links |
|
||||
![]()
Ich denk mal das der Fehler daran liegt das du body nicht mittels CSS margin: 0 vergeben hast.
Stichwort: Reset CSS. Zusätzlich solltest du einen doctype in deiner HTML Datei verwenden. Z.B. die HTML5 Variante <!DOCTYPE html> So würde es dann im Quellcode ausschauen: Code:
<!DOCTYPE html> <html lang="de"> <head> <meta charset="utf-8" /> <title>HTML5 Layout</title> <link rel="stylesheet" href="css/main.css" type="text/css" /> </head> <body> ... </body> </html>
__________________
Webdesigner Düsseldorf |
Sponsored Links |
|
||||
![]()
Hallo,
der Wert 0 benötigt keine Einheit. Zudem hat das von dir gepostete CSS einen Tippfehler, denn dort steht margin: 0xp;. Es wäre definitiv von Vorteil, wenn du uns das dazugehörige HTML zur Verfügung stellst und evt. sogar eine Online-Version, welche das Problem zeigt. Gruß, lotti.
__________________
Empfehlenswerte Links: jsFiddle | JavaScript Patterns | RedBeanPHP | Mozilla Developer Network -/- W3C Validator | JSLint |
![]() |
Stichwörter |
css, horizontal, navigationsleise |
Themen-Optionen | |
Ansicht | |
|
|
![]() |
||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
horizontale Navigationsleiste | Kaykay | (X)HTML | 3 | 04.11.2010 09:41 |
horizontale Navigationsleiste | Tobe | CSS | 0 | 20.07.2008 11:34 |
Horizontale Navigationsleiste | Marco D. | CSS | 10 | 19.08.2007 11:55 |
Mitwachsende horizontale Navigationsleiste und Schriftarten | boxi | CSS | 1 | 17.04.2006 18:24 |
mit <li> horizontale navigationsleiste | oimelchen | CSS | 17 | 26.10.2005 20:29 |