|
|||
Menü
Hallo,
ich habe folgendes Problem. Ich habe ein Div für ein Menü von 975px Breite in dem Menü befinden sich 12 Reiter unterschiedlicher Breite. Ich kann die Gesamtbreite des Inhalts über Schriftgröße bzw, Margin oder Padding verändern, aber dann sieht es in den Browsern unterschiedlich aus. Wie kann ich es so einstellen das sich der Inhalt, sprich die Reiter in den Div einpassen. Anbei alle betreffenden CSS Absätze, wie es jetzt ist. #menue { width: 975px; left: 0px; top: 170px; text-align: left; position: absolute; height: 25px; padding: 5px 0px 9px 0px; margin: 0px; font-variant: small-caps; font-size: 95%; text-transform: none; } #menue ul { list-style-type: none; margin:0px; padding:0px; color: #FFFEED; width: 975px; left: auto; right: auto; } #menue li { display: inline; font-variant: small-caps; width: auto; overflow: visible; font-size: 13px; float: left; margin-top: 0px; margin-right: 1px; margin-bottom: 0px; margin-left: 1px; } #menue li a { margin: 0px; background : url(images/menuebutton.gif) no-repeat top right; text-decoration: none; font-weight: bold; color: #FFFEED; border-right: 0px solid #ffffff; padding-top: 6px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; } #menue li a img { padding-right: 2px; } #menue li a.sel { background: url(images/menuebuttona.gif) no-repeat top right; } #menue li a:hover { background: url(images/menuebuttona.gif) no-repeat top right; color: #FFFEED; } Würde mich freuen wenn jemand eine Lösung hat. Grüße Frank |
Sponsored Links |
|
|||
Hallo, brauchst du position absolute überhaupt?, und wie sieht der Rest aus.
So: Code:
* { margin: 0; padding: 0; } #menue { left: 0; position: absolute; text-align: left; text-transform: none; top: 170px; width: 975px; } #menue ul { height: 30px; list-style-type: none; margin: 5px 0px 9px 0px; } * + html #menue ul { height: 27px; } #menue ul li { float: left; margin: 0px 1px; } #menue ul li a { background: #f9a200 url(images/menuebutton.gif) no-repeat top right; color: #FFFEED; display: block; font-variant: small-caps; font-weight: bold; font-size: 13px; text-decoration: none; padding: 6px 8px 8px 8px; } Gruß, Roland |
Sponsored Links |
|
|||
AW: Menü
Hallo,
ich habe die Position auf absolut gesetzt, weil die Navbar dort fest stehen sollte. Hier noch der gesamte Code: Code:
@charset "utf-8"; /* CSS Document */ BODY { margin:0px; padding:0px; } #header1 { background-image: url(pic_name.gif); background-repeat: no-repeat; position: absolute; left: 0px; top: 10px; width: 975px; } #header2 { position: absolute; left: 0px; top: 155px; width: 110%; } #menue { width: 975px; left: 0px; top: 170px; text-align: left; position: absolute; height: 25px; padding: 5px 0px 9px 0px; margin: 0px; font-variant: small-caps; font-size: 95%; text-transform: none; } #menue ul { list-style-type: none; margin:0px; padding:0px; color: #FFFEED; width: 975px; left: auto; right: auto; } #menue li { display: inline; font-variant: small-caps; width: auto; overflow: visible; font-size: 13px; float: left; margin-top: 0px; margin-right: 1px; margin-bottom: 0px; margin-left: 1px; } #menue li a { margin: 0px; background : url(images/menuebutton.gif) no-repeat top right; text-decoration: none; font-weight: bold; color: #FFFEED; border-right: 0px solid #ffffff; padding-top: 6px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; } #menue li a img { padding-right: 2px; } #menue li a.sel { background: url(images/menuebuttona.gif) no-repeat top right; } #menue li a:hover { background: url(images/menuebuttona.gif) no-repeat top right; color: #FFFEED; } #sidebar_li { border: thin solid #F00; width: 160px; left: 0px; margin-top: 35px; position: absolute; z-index: 10; top: 165px; } #sidebar_re { border: thin solid #F00; width: 200px; height:233px; left: 771px; margin-top: 35px; position: absolute; z-index: 20; top: 165px; } #content { border: thin solid #F00; width: 580px; left: -596px; margin-top: 0px; position: absolute; top: 5px; } LG Frank Geändert von frango77 (30.09.2011 um 09:13 Uhr) |
|
|||
Die breite Dynamisch anpassen, entweder mit % angaben oder mit Javascript.
Wie wärs, aber mal, wenn du deinen Code dahingehend überprüfst, dass es in allen Browsern in etwa passt. Zur not auch mit einer Browserweiche / Conditional Comments (IE) ? |
Stichwörter |
css boxen |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Darstellungsproblem | flohpapa | CSS | 3 | 16.12.2009 08:55 |
Vertikale Navigation: IE6 - Whitespace-Bug? | b.erry | CSS | 6 | 12.02.2009 16:46 |
Umbruch in einem LI bei horizontalem Menü | M4rco | CSS | 12 | 13.10.2006 11:26 |
Navigation - Menü | T.S. | CSS | 6 | 18.02.2006 18:49 |